Bug Tracker

Opened 6 years ago

Closed 6 years ago

#14273 closed bug (invalid)

.slideUp and .slideDown not working on canvas tags

Reported by: daniel.hoffmann.bernardes@… Owned by: daniel.hoffmann.bernardes@…
Priority: undecided Milestone: None
Component: unfiled Version: 2.0.3
Keywords: Cc:
Blocked by: Blocking:

Description

The title says it all, instead of doing the slide it does the .hide() and .show() animations instead.

How to reproduce:

<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<style type="text/css">
	canvas {
		background-color: red;
		display: block;
	}
</style>
</head>
	<body>
	<canvas/>
	<script type="text/javascript">
		"use strict";
		$("canvas").click(function() {
			$("canvas").slideUp(1000);
		});
	</script>
</body>
</html>

Change History (3)

comment:1 Changed 6 years ago by dmethvin

Owner: set to daniel.hoffmann.bernardes@…
Status: newpending

Hi, can you create a demonstration of the problem at jsFiddle.net please? Also, are you seeing the same behavior on all browsers?

comment:2 Changed 6 years ago by Daniel Hoffmann Bernardes <http://jsfiddle.net/3JzNs/>

http://jsfiddle.net/3JzNs/

Opera 12.15 works as expected Firefox 21.0 and Chrome 27.0.1453.93 shows the problem. Sorry about not subimitting a fiddle before, It thought since it was so simple there was no need for a fiddle. I can't test on IE or Safari right now (I should really setup some windows VMs here).

It seems the problem is that on those browsers the canvas tag tries to keep the aspect ratio, so when reducing the height it also reduces the width of the element. Not enterily sure if the jQuery team can (or should) work around this particular annoyance.

comment:3 Changed 6 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.