Opened 14 years ago

Last modified 9 years ago

#5320 open bug

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

Change History (7)

comment:1 Changed 14 years ago by Scott González

Milestone: TBD1.next

comment:2 Changed 13 years ago by Corey Frang

Status: newopen

comment:3 Changed 11 years ago by Scott González

Milestone: 1.next1.10.0

comment:4 Changed 11 years ago by mikesherov

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

comment:5 Changed 11 years ago by Corey Frang

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.

comment:6 Changed 11 years ago by Scott González

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+.

comment:7 Changed 9 years ago by Scott González

Milestone: 1.11.0none
Note: See TracTickets for help on using tickets.