Last modified: 2014-10-03 17:51:49 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 T73609, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71609 - OOjs UI: Scrolling elements into view does not work in most cases
OOjs UI: Scrolling elements into view does not work in most cases
Status: ASSIGNED
Product: OOjs UI
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: High major
: ---
Assigned To: Editing team bugs – take if you're interested!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-03 12:06 UTC by Bartosz Dziewoński
Modified: 2014-10-03 17:51 UTC (History)
4 users (show)

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


Attachments

Description Bartosz Dziewoński 2014-10-03 12:06:20 UTC
Scrolling elements into view does not work in most cases; in fact it seems to depend on some Blink-specific behaviors and thus only works reliably on Blink.

In particular, the code below doesn't scroll the page at all when it clearly should. (Adjust the numbers to be large enough for your screen.)

  var el = new OO.ui.Element( { text: 'Test' } );
  el.$element.css( { position: 'absolute', left: 2000, top: 3000 } );
  el.$element.appendTo( 'body' );
  el.scrollElementIntoView();

Bug 71540 in VE is another case, the page is only scrolled horizontally in Blink (although vertical scrolling works).

I haven't investigated closely, but getClosestScrollableContainer() hard-codes document's body for some cases, and apparently browsers prefer to scroll documentElement instead.

(Prior to bug 54928 it fell back on window, and Krinkle's comments on that bug claim that jQuery can't animate scrolling on documentElement. I haven't verified that.)

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


Navigation
Links