mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 23:05:35 +00:00
9303648406
What I learned today: * Window doesn't have a scrollTop property, body does (that's why animate doesn't work on window) * jQuery.scrollTop() doesn't work on body (in firefox) but works on window everywhere * jQuery.scrollTop() uses scroll offset, not the scrollTop property * Body doesn't have an onscroll event, window does What I really learned today: * Browsers are very poorly designed Objective: * Make clippable elements properly resize in Firefox when scrolled Diagnosis: * Scroll events were not being emitted from the scrollable container after the merge of Ifec0dae598f7fd99270588bd8ca77777a07e9669 because such events are not emitted from body tags, only scrollable divs and windows * jQuery.scrollTop was giving incorrect values when called on the body instead of the window, so also due to the aforementioned change, the clipping was being calculated incorrectly Treatment: * Add $clippableScroller property, which is either a scrollable div or the window (could this have side-effects if someone did something ridiculous like made the body absolutely positioned and overflow:auto? Yes, but I have no other option and that's a strange edge case don't you think?) * Use $clippableScroller for listening to scroll events and getting the scrollTop value from jQuery Bug: 55343 Change-Id: I819aba60b200059886b347115fda437b3dc9cb7a |
||
---|---|---|
.. | ||
actions | ||
elements | ||
inspectors | ||
layouts | ||
styles | ||
toolgroups | ||
tools | ||
widgets | ||
ve.ui.Action.js | ||
ve.ui.ActionFactory.js | ||
ve.ui.CommandRegistry.js | ||
ve.ui.Context.js | ||
ve.ui.Dialog.js | ||
ve.ui.DialogFactory.js | ||
ve.ui.Frame.js | ||
ve.ui.Inspector.js | ||
ve.ui.InspectorFactory.js | ||
ve.ui.js | ||
ve.ui.Layout.js | ||
ve.ui.Surface.js | ||
ve.ui.SurfaceToolbar.js | ||
ve.ui.TargetToolbar.js | ||
ve.ui.Tool.js | ||
ve.ui.Toolbar.js | ||
ve.ui.ToolFactory.js | ||
ve.ui.ToolGroup.js | ||
ve.ui.Trigger.js | ||
ve.ui.TriggerRegistry.js | ||
ve.ui.Widget.js | ||
ve.ui.Window.js | ||
ve.ui.WindowSet.js |