Open Bug 935365 Opened 7 years ago Updated 3 years ago
(web compat) window
.scroll To() should not throw an error when called with 0 or 1 arguments
Over in Chromium we recently looked into window.scrollTo() and found some cross-browser inconsistencies in the edge case of no arguments: Chromium - window.scrollTo() scrolls to the top of the window IE - window.scrollTo() scrolls to the top of the window Safari - window.scrollTo() scrolls to the top of the window Firefox - window.scrollTo() throws "Exception... Not enough arguments [nsIDOMWindow.scrollTo]." (similarly for window.scroll and window.scrollBy) This isn't spec'ed (http://www.w3.org/TR/html5/browsers.html#window) and is incredibly minor, but it would be nice if we all aligned on one behavior. For reference, this was discussed in the comments of https://codereview.chromium.org/59863003. This may be a good first bug for someone :)
This is in fact specced at http://dev.w3.org/csswg/cssom-view/#extensions-to-the-window-interface and the spec as currently written requires the Gecko behavior. Perhaps the spec needs to change, in which case you should just raise this as a spec issue.
Summary: (web compat) window.scrollTo() should not throw an error → (web compat) window.scrollTo() should not throw an error when called with 0 or 1 arguments
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.