Last modified: 2013-10-04 03:55:10 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56928, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54928 - VisualEditor: [Regression] Page settings dialog broken in Chrome (Uncaught TypeError: scrollTop of undefined)
VisualEditor: [Regression] Page settings dialog broken in Chrome (Uncaught Ty...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
MediaWiki integration (Other open bugs)
unspecified
All All
: Highest critical
: VE-deploy-2013-10-03
Assigned To: Krinkle
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-03 18:02 UTC by James Forrester
Modified: 2013-10-04 03:55 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description James Forrester 2013-10-03 18:02:32 UTC
Splitting from bug 54322.
Comment 1 Krinkle 2013-10-03 19:56:18 UTC
I can reproduce this in Chrome on en.wikipedia.org. Though not every time.

Stack trace:

Uncaught TypeError: Cannot use 'in' operator to search for 'scrollTop' in
undefined load.php?…:102
vendorPropName load.php?…:102
jQuery.extend.css load.php?…:105
Tween.propHooks._default.get load.php?…:136
Tween.cur load.php?…:136
Tween.init load.php?…:135
Tween load.php?…:135
Animation.deferred.promise.createTween load.php?…:131
tweeners.* load.php?…:129
(anonymous function) load.php?…:130
jQuery.extend.each load.php?…:8
createTweens load.php?…:130
Animation load.php?…:132
doAnimation load.php?…:137
jQuery.extend.dequeue load.php?…:25
(anonymous function) load.php?…:26
jQuery.extend.each load.php?…:8
jQuery.fn.jQuery.each load.php?…:4
jQuery.fn.extend.queue load.php?…:26
jQuery.fn.extend.animate load.php?…:138
ve.Element.scrollIntoView load.php?ext.visualEditor…:11
ve.Element.scrollElementIntoView load.php?ext.visualEditor…:12
ve.ui.OptionWidget.setSelected load.php?ext.visualEditor…:404
ve.ui.SelectWidget.selectItem load.php?ext.visualEditor…:400
ve.ui.PagedDialog.addPage load.php?ext.visualEditor…:458
ve.ui.MWMetaDialog.initialize load.php?ext.visualEditor…:461
ve.ui.Window.onFrameInitialize load.php?ext.visualEditor…:353
oo.EventEmitter.emit load.php?ext.visualEditor.bas…:133
ve.ui.Frame.load load.php?ext.visualEditor…:351
ve.ui.WindowSet.open load.php?ext.visualEditor…:356
ve.init.mw.ViewPageTarget.onToolbarMwMetaButtonClick
load.php?ext.visualEditor.bas…:87
proxy load.php?…:10
jQuery.event.dispatch load.php?…:45
elemData.handle.eventHandle load.php?…:38

In plain English:
- User clicks Page settings button
- Dialog doesn't exist yet, so we instantiate it and initialise it
- MWMetaDialog.initialize adds the 'categories' section
- SelectWidget sees we don't have a selected panel yet, and now that
  we have > 0 panels, it selects this new one
- OptionWidget is brave and tries to ensure the selected panel is
  visibile attempting to scroll it into view
- ve.Element traverses up from the panel element until it eventually is
  unable to find any element that is scrollable and falls back to
  ve.Element.getWindow( el )
- We hand off this element (= detached iframe's window), to $.fn.animate
  which will try to animate scrollTop to 60px.

Both in our jQuery version (v1.8.3) and the current one in use on jquery.com (v1.9.1) animating scrollTop on either window, document or document.documentElement (<html>) is not supported and results in :


$(window).animate({'scrollTop': 100})
< TypeError: Cannot use 'in' operator to search for 'scrollTop' in undefined

* $.css: There is no window.style, and thus no 'scrollTop' in window.style
* Also, there is no window.scrollTop

$(document).animate({'scrollTop': 100})
< TypeError: Cannot read property 'ownerDocument' of null

* There is no document.scrollTop.

$(document.documentElement).animate({'scrollTop': 100})
> [ <html> ]

* No exception, but scroll unchanged.
* There is a document.documentElement.scrollTop, but it doesn't appear to
  do anything (defaults to 0, setting is a no-op)

 
$(document.body).animate({'scrollTop': 100})
> [ <body> ]

* Works!



.... so, we should fix getClosestScrollableContainer to not fallback to window, because that's not a viable fallback as that is in fact not a scrollable container.
Comment 2 Gerrit Notification Bot 2013-10-03 20:38:05 UTC
Change 87442 had a related patch set uploaded by Krinkle:
(DRAFT) ve.Element: Fallback to body, window is not scrollable

https://gerrit.wikimedia.org/r/87442
Comment 3 Gerrit Notification Bot 2013-10-03 22:27:39 UTC
Change 87442 merged by jenkins-bot:
ve.Element: Fallback to body, window is not scrollable

https://gerrit.wikimedia.org/r/87442
Comment 4 Gerrit Notification Bot 2013-10-03 22:27:54 UTC
Change 87466 had a related patch set uploaded by Jforrester:
ve.Element: Fallback to body, window is not scrollable

https://gerrit.wikimedia.org/r/87466
Comment 5 Gerrit Notification Bot 2013-10-03 22:28:06 UTC
Change 87467 had a related patch set uploaded by Jforrester:
ve.Element: Fallback to body, window is not scrollable

https://gerrit.wikimedia.org/r/87467
Comment 6 Gerrit Notification Bot 2013-10-03 23:11:37 UTC
Change 87467 merged by jenkins-bot:
ve.Element: Fallback to body, window is not scrollable

https://gerrit.wikimedia.org/r/87467
Comment 7 Gerrit Notification Bot 2013-10-03 23:12:33 UTC
Change 87466 merged by jenkins-bot:
ve.Element: Fallback to body, window is not scrollable

https://gerrit.wikimedia.org/r/87466
Comment 8 Roan Kattouw 2013-10-03 23:32:43 UTC
(In reply to comment #3)
> Change 87442 merged by jenkins-bot:
> ve.Element: Fallback to body, window is not scrollable
> 
> https://gerrit.wikimedia.org/r/87442
This was just deployed.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links