Catrope has uploaded a new change for review.
https://gerrit.wikimedia.org/r/169228
Change subject: Make link inspector not close itself in IE... again
......................................................................
Make link inspector not close itself in IE... again
My hacks for making the blur/focus code not notice that
the selection moved seem to be working (but only in VE-MW,
not in VE core), but now the SurfaceObserver's polling
is noticing that the range goes to null instead, and that's
causing inspectors to close themselves at the first poll.
To work around this, stop the observer when an inspector
is opened, and restart it once it's closed. There should
be nicer facilities for this in ce.Surface, but right now
we just want to fix a critical IE bug.
In the future, there should be more advanced logic here
with fake selections, so we can un-isolate inspectors.
Bug: 72392
Change-Id: I0a7c6aed37c1688eb81d4ca0c9ded231f9fd68f1
---
M src/ui/ve.ui.Context.js
1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor
refs/changes/28/169228/1
diff --git a/src/ui/ve.ui.Context.js b/src/ui/ve.ui.Context.js
index 968e5da..eb8974b 100644
--- a/src/ui/ve.ui.Context.js
+++ b/src/ui/ve.ui.Context.js
@@ -123,7 +123,14 @@
* @param {Object} data Window opening data
*/
ve.ui.Context.prototype.onInspectorOpening = function ( win, opening ) {
+ var observer = this.surface.getView().surfaceObserver;
this.inspector = win;
+
+ // Shut down the SurfaceObserver as soon as possible, so it doesn't get
confused
+ // by the selection moving around in IE. Will be reenabled when
inspector closes.
+ // FIXME this should be done in a nicer way, managed by the Surface
classes
+ observer.pollOnce();
+ observer.stopTimerLoop();
opening
.progress( ve.bind( function ( data ) {
@@ -145,6 +152,9 @@
this.inspector = null;
+ // Reenable observer
+ observer.startTimerLoop();
+
if ( inspectable ) {
// Change state: inspector ->
menu
this.menu.toggle( true );
--
To view, visit https://gerrit.wikimedia.org/r/169228
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a7c6aed37c1688eb81d4ca0c9ded231f9fd68f1
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: wmf/1.25wmf4
Gerrit-Owner: Catrope <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits