mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 23:05:35 +00:00
29532f15db
And other focus behavior fixes. ve.ce.Surface.prototype.focus: * Restore focus to the pasteTarget if a focusedNode was selected. This function is invoked when a dialog is closed, and we were always focusing the documentNode, which means the selection was restored incorrectly when the selection was really in the pasteTarget. ve.ce.Surface.prototype.documentOnFocus: * Don't rerender the model selection if the documentNode was focused but a focusedNode is selected. Otherwise the user can never deselect a focusedNode. ve.ce.Surface.prototype.onModelSelect: * Rerender the selection even if prev === next. This function was already called as a means to rerender a lost selection, and it didn't work if it so happened that the selection was still the same and was on a focusedNode. * Clear the surfaceObserver state when moving focus from the documentNode to the pasteTarget. If we don't do this, then placing the selection back in the documentNode at the exact same place where it was before will not be noticed by the observer. ve.ui.Context.prototype.onSurfaceFocus: * Hide the context only when an inspector is open, not just when the context popup is visible. This ensures that the context is still hidden when the user clicks out of an inspector, but fixes a bug where the context was hidden when the selection was restored on an inspectable focusedNode. Bug: 58090 Change-Id: I0658f025a9c6005d769fd0291380fcb9c1ba4f32 |
||
---|---|---|
.. | ||
jquery | ||
jquery.i18n | ||
jquery.uls | ||
jsdifflib | ||
oojs | ||
oojs-ui | ||
qunit | ||
rangy | ||
syntaxhighlight | ||
unicodejs | ||
ve | ||
ve-mw | ||
ve-wmf/i18n |