Skip to main content

Bug Tracker

Side navigation

#8391 closed bug (duplicate)

Opened February 26, 2011 11:43AM UTC

Closed February 28, 2011 11:23AM UTC

Last modified February 28, 2011 05:23PM UTC

scrollTop, scrollLeft setters break chaining when selector doesn't match any elements

Reported by: Owned by:
Priority: high Milestone:
Component: offset Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:

The following line throws a javascript error:


The reason is that both scrollTop and scrollLeft always return

null when the selector doesn't match any elements. They should

only return null when used as getter (i.e. called without any


Test case:

Attachments (0)
Change History (5)

Changed February 27, 2011 02:02AM UTC by dmethvin comment:1

status: newopen

Yep, seems inconsistent.

Changed February 27, 2011 09:27PM UTC by dmethvin comment:2

component: unfiledattributes
milestone: 1.next1.6
priority: undecidedlow

Changed February 28, 2011 11:23AM UTC by jitter comment:3

component: attributesoffset
priority: lowhigh
resolution: → duplicate
status: openclosed

Changed February 28, 2011 11:23AM UTC by jitter comment:4

Duplicate of #7931.

Changed February 28, 2011 05:23PM UTC by anonymous comment:5

Here's a pull request with the fix: