Bug Tracker

Modify

Ticket #4906 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

Methods jQuery.fn.scrollLeft and jQuery.fn.scrollTop are slow for window

Reported by: mdevils Owned by: brandon
Priority: minor Milestone: 1.4
Component: offset Version: 1.3.2
Keywords: Cc:
Blocking: Blocked by:

Description

If page is not scrolled, the expression will go through all the variants:

this[0] == window || this[0] == document ?
                    self[ i ? 'pageYOffset' : 'pageXOffset' ]
                    ||   jQuery.boxModel && document.documentElement[ method ] ||
					    document.body[ method ]) :
				this[0][ method ];

If window.pageYOffset or window.pageXOffset are defined, they should be returned for window.

Change History

comment:1 Changed 4 years ago by brandon

  • Priority changed from major to minor
  • Status changed from new to closed
  • Resolution set to fixed

Thanks for catching this mdevils. :) Fixed in r6451

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.