mediawiki-extensions-Visual.../modules/ve/ui
Roan Kattouw 970cf03cc8 Followup 5d7673eb: still adjust width/height when positioning fails
ve.ui.Context#updateDimensions does two things: it updates the position
of the popup by measuring where the selection is, and it updates the
width and height of the popup by measuring the contents of the inspector
or the context menu.

In some cases, measuring where the selection is fails, and
ve.ce.Surface#getSelectionRect returns null. This seems to only happen
1) in phantomjs while running the test suite and 2) when an inspector
is opened and doesn't adjust the selection while opening. I suspect
it has something to do with the selection not having been recently
set or the documentNode not having focus, but I haven't investigated
this in depth yet.

Prior to 5d7673eb, the editor would simply crash of the position
measurement failed. 5d7673eb changed this to just bail completely if
the position couldn't be measured, but that's also wrong. Without a
position measurement, we can't update the position of the popup, but
we can still adjust its width and height, and we should.

The failure to adjust the popup's width and height in this case was
causing a bug where opening the link inspector with the selection
set exactly to what the inspector would expand it to would cause the
popup's width and height to never be adjusted, and most of the inspector
to be invisible.

Bug: 58301
Change-Id: Ia6504e0a7b0cd1affbff2632e9f573684f1d5dcb
2013-12-11 19:54:44 +00:00
..
actions Re-order command registry to match toolbar order 2013-12-02 14:18:03 +00:00
inspectors Spell removable and movable using modern English 2013-12-06 12:24:36 -08:00
styles Merge "Text style icon" 2013-12-11 01:46:50 +00:00
tools Set up node-jscs, pass it, and configure in local Gruntfile 2013-12-06 10:37:27 -08:00
widgets Set up node-jscs, pass it, and configure in local Gruntfile 2013-12-06 10:37:27 -08:00
ve.ui.Action.js
ve.ui.ActionFactory.js
ve.ui.Command.js
ve.ui.CommandRegistry.js Re-order command registry to match toolbar order 2013-12-02 14:18:03 +00:00
ve.ui.Context.js Followup 5d7673eb: still adjust width/height when positioning fails 2013-12-11 19:54:44 +00:00
ve.ui.Dialog.js Window refactor 2013-11-08 12:33:25 -08:00
ve.ui.Inspector.js Spell removable and movable using modern English 2013-12-06 12:24:36 -08:00
ve.ui.js Window refactor 2013-11-08 12:33:25 -08:00
ve.ui.Surface.js Only strip style attributes on rich paste from VE 2013-12-09 22:25:43 +00:00
ve.ui.TargetToolbar.js Window refactor 2013-11-08 12:33:25 -08:00
ve.ui.Toolbar.js Add direction classes to Toolbar based on context 2013-12-03 15:24:54 -08:00
ve.ui.ToolFactory.js
ve.ui.Trigger.js
ve.ui.TriggerRegistry.js Plain text paste with paste special 2013-11-26 18:23:58 +00:00
ve.ui.WindowSet.js Window refactor 2013-11-08 12:33:25 -08:00