Skip to main content

Search and Top Navigation

#5320 open bug ()

Opened March 10, 2010 08:39PM UTC

Last modified June 24, 2014 11:54PM UTC

Can't realy clear queue after Blind effect

Reported by: betalb Owned by:
Priority: minor Milestone: none
Component: ui.effects.* (individual effect) Version: 1.8rc3
Keywords: Cc:
Blocked by: Blocking:
Description

If I start blind effect, and in the middle call stop(true, true)

next effect will start anyway

here is a sample code

<!DOCTYPE html>
<html>
	<head>
		<style type="text/css"> #element { background: green; } </style>
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
		<script type="text/javascript" src="jquery-ui.js"></script>
		<script type="text/javascript">
			$(function () {
				$('#btn1').click(function (event) {
					$('#element')
						.effect('blind', {
							duration: 3000,
							mode: 'show',
							complete: function () {
								console.log('Blind completed');
							}
						})
						.effect('highlight', {
							duration: 3000,
							complete: function () {
								console.log('Highlight completed');
							}
						});

					setTimeout(function () {
						console.log('timeout fired');
						$('#container *:animated').stop(true, true);
						console.log('effects stopped');
						$('#container').html('');
						console.log('html changed');
					}, 1500);
				});
			});
		</script>
	</head>
	<body>
		<button id="btn1">1</button>
		<div id="container"><div id="element">123<br>321</div></div>
	</body>
</html>

and output

timeout fired
Blind completed
effects stopped
html changed
Highlight completed
Attachments (0)
Change History (7)

Changed March 11, 2010 08:14PM UTC by scottgonzalez comment:1

milestone: TBD1.next

Changed March 28, 2011 05:22PM UTC by gnarf comment:2

status: newopen

Changed October 03, 2012 05:01PM UTC by scottgonzalez comment:3

milestone: 1.next1.10.0

Changed October 18, 2012 01:38AM UTC by mikesherov comment:4

still present on latest: http://jsfiddle.net/hJBgA/3/

Changed November 28, 2012 05:15PM UTC by gnarf comment:5

milestone: 1.10.01.11.0

There is no "good" way to fix this until jQuery Core 1.7 is our minimum - at that point I get queue hooks for stop. Punting to 1.11 in case we update the minimum version.

Changed November 28, 2012 06:14PM UTC by scottgonzalez comment:6

Can we just feature detect on the hook and use it if it exists? We'll be broken in 1.6.x, but working in 1.7+. That at least seems better than waiting for months to act on it. I'd be ok with closing as fixed even if it's only fixed in jQuery 1.7+.

Changed June 24, 2014 11:54PM UTC by scottgonzalez comment:7

milestone: 1.11.0none