Opened 12 years ago

Closed 11 years ago

Last modified 10 years ago

#5960 closed bug (duplicate)

[RFC] Problem with fast clicking on large button

Reported by: juliobiason Owned by:
Priority: minor Milestone:
Component: ui.button Version: 1.8.4
Keywords: Cc:
Blocked by: Blocking:


We have a large buttonset (around 36 elements) and we found that, sometimes, when we click really fast (i.e. toggle the status of some closer elements), the button would get a ui-state-active class, but neither its aria or checked would change. This could be checked in Firefox 3.6.x and 4.0b3.

I had the impression that, when we did that, the event being currently dealt with got interrupted and the new event would take control. So the class would change, but not the status of the checkbox behind it (Note: I'm talking this out of my ass, I don't have enough knowledge about the internals of Firefox).

The solution I found was to force everything to happen in a single pass, basically "blocking" any other actions till everything could be changed at once (again, out of my ass.)™

The changed code: (in jquery-ui-1.8.4.custom.js, around line 5384):

				if ( options.disabled ) {
					return false;
				// inverted controls
				if(self.element[0].checked) {
					self.buttonElement.attr('aria-pressed', false);
					self.element[0].checked = false;
					return false;
				} else {
					self.buttonElement.attr('aria-pressed', true);
					self.element[0].checked = true;
					return false;

It worked for us, but I'm not sure if this solves another problem (#5518 comes to my mind, after reading their report) or actually causes more problems.

Is this code safe?

Change History (5)

comment:1 Changed 12 years ago by juliobiason

Btw, if anyone wants to check the running code, we have it at:

comment:2 Changed 12 years ago by nachoab

Will this ever get fixed ? if I click rapidly on a button, it skips the click event just like he says but with every single button. Very annoying. Can't believe this has 5 months.

By the way, that workaround isn't working for me.

Version 0, edited 12 years ago by nachoab (next)

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

Resolution: duplicate
Status: newclosed

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

Duplicate of #5518.

comment:5 Changed 10 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.