Bug Tracker

Opened 8 years ago

Closed 8 years ago

#9875 closed bug (invalid)

jQuery.active decrementing loses scrollbar focus in IE

Reported by: Velveeta Owned by:
Priority: low Milestone: None
Component: misc Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:

Description

We have an app with an "overflow-x: auto;" enabled container, and are using a jQuery scrollevents plugin to simulate a 'scrollstop' event when the user stops scrolling for 300ms (even if not releasing the mouse button, but pausing in mid-scroll for 300ms)... When scrollstop fires, it's supposed to ajax-load content in the visible containers in the scrollable window, and this all works fine...

However, in IE *only* (version 7 as far as I can tell, not sure about 8), when those ajax requests fire, and the done function executes, and this specific line executes near the bottom of that function (line 7148 of 1.6.1):

if ( !( --jQuery.active ) ) {

The act of decrementing that variable seems to cause IE to lose the user's grip on the scrollbar handle, they have to re-click on it to continue dragging back and forth... I've tried separating the math from the logic check by decrementing it first and then checking the value (with the decrement operator in front of and behind the variable). I've tried scrapping the decrement operator altogether and making jQuery.active = jQuery.active - 1. I've tried changing the jQuery.active reference to jQueryactive?. I've also tried something like this:

temp = jQuery.active - 1; jQuery.active = temp;

In all cases, it seems that anytime that 'active' property is decremented, the browser has a brain fart and loses its focus on the scrollbar... Incrementing that value does not cause the problem, but causes that if-statement to never evaluate to true and never trigger ajaxStop... I also tried adding an activeTotal variable that I could increment as ajax requests completed, and just compare that jQuery.active == jQuery.activeTotal, but the *incrementing* of the activeTotal variable caused this issue to happen also... I'm at my wit's end on why this would be happening... Help me Obi-Wan Kenobi's, you're my own hopes...

Change History (1)

comment:1 Changed 8 years ago by addyosmani

Component: unfiledmisc
Priority: undecidedlow
Resolution: invalid
Status: newclosed

Thank you for submitting a ticket to the jQuery bug tracker! Unfortunately, we are unable to assist with issues related to third party plugins. For assistance with the plugin mentioned, please directly contact the plugin authors, either via their GitHub account or the plugin site.

If they or you are able to reduce the issue experienced down to a problem with jQuery core that can be demonstrated outside of the plugin, we'll be happy to take another look at this.

Note: See TracTickets for help on using tickets.