Page MenuHomePhabricator

Cite dialog can't be closed when pasting something extremely quickly before it opens
Closed, ResolvedPublic0 Estimated Story Points

Description

Cite dialog stucks in visual editor. Reproduce:

  1. copy some text (no matter of what is it)
  2. open some article in edit mode
  3. put your cursor somewhere on article
  4. click "Cite" in the menu
  5. before than the cite dialog opens, type fast ctrl+v (paste)
  6. the cite dialog opens but can't be closed

I encountered this bug in Firefox 52.0.2.

Event Timeline

Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.
Jdforrester-WMF set the point value for this task to 1.
Esanders lowered the priority of this task from High to Low.May 9 2017, 3:45 PM
Esanders subscribed.

I can't reproduce this, the Cite dialog always opens instantly, and no matter how fast I paste after clicking it still works. Either way this doesn't seem like a typical user interaction so lowering priority.

If you can still reproduce this, can you do it with the console open and see if there are any exceptions?

I can still reproduce.

From the console:

Warning: This site appears to use a scroll-linked positioning effect. This may not work well with asynchronous panning; see https://developer.mozilla.org/docs/Mozilla/Performance/ScrollLinkedEffects for further details and to join the discussion on related tools and features!

Error: Nested change of newModelSelection load.php:1337:998

(I copied the row 1337 below if it helps)

SelectionState(this.nativeSelection);}else{selectionState=this.getSelectionState(range);}return selectionState.getNativeRange(this.getElementDocument());};ve.ce.Surface.prototype.appendHighlights=function($highlights,focused){this.$highlightsBlurred.children().detach();if(focused){this.$highlightsFocused.append($highlights);}else{this.$highlightsBlurred.append($highlights);}};ve.ce.Surface.prototype.getSurface=function(){return this.surface;};ve.ce.Surface.prototype.getModel=function(){return this.model;};ve.ce.Surface.prototype.getDocument=function(){return this.documentView;};ve.ce.Surface.prototype.isRenderingLocked=function(){return this.renderLocks>0;};ve.ce.Surface.prototype.incRenderLock=function(){this.renderLocks++;};ve.ce.Surface.prototype.decRenderLock=function(){this.renderLocks--;};ve.ce.Surface.prototype.afterRenderLock=function(callback){setTimeout(callback);};ve.ce.Surface.prototype.changeModel=function(transactions,selection){if(this.newModelSelection!==null){throw new Error

That's a very annoying bug...

I also uploaded a video if it helps to understand the problem:
It's at https://www.youtube.com/watch?v=7sj93YkisOY
at 0:04 immediately after clicking the "viittaa" (cite) I type ctrl+v (paste).
Sometimes I fail to reproduce this, if I type ctrl+v at a wrong time.

I can reproduce this. I have to press ctrl-v at incredible speed at exactly the right time after clicking on the cite button. It pastes the text, and then the cite box follows you around as you click in the article.

Given the reproductions steps, I don't think this warrants an increase in priority.

load.php?debug=false&lang=en&modules=ext.visualEditor.core|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.s…:441 Uncaught Error: Nested change of newModelSelection
    at VeCeSurface.ve.ce.Surface.changeModel (https://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=ext.visualE…Coojs-ui.styles.icons-editing-advanced&skin=vector&version=07p05gk:441:407)
    at VeCeSurface.ve.ce.Surface.handleObservedChanges (https://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=ext.visualE…Coojs-ui.styles.icons-editing-advanced&skin=vector&version=07p05gk:425:272)
    at VeCeSurfaceObserver.ve.ce.SurfaceObserver.pollOnceInternal (https://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=ext.visualE…Coojs-ui.styles.icons-editing-advanced&skin=vector&version=07p05gk:447:836)
    at VeCeSurfaceObserver.ve.ce.SurfaceObserver.pollOnce (https://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=ext.visualE…Coojs-ui.styles.icons-editing-advanced&skin=vector&version=07p05gk:447:215)
    at VeCeSurface.ve.ce.Surface.activate (https://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=ext.visualE…Coojs-ui.styles.icons-editing-advanced&skin=vector&version=07p05gk:388:940)
    at Object.<anonymous> (https://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=ext.visualE…Coojs-ui.styles.icons-editing-advanced&skin=vector&version=07p05gk:630:849)
    at Object.<anonymous> (https://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cme…Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=10b6ayp:47:129)
    at fire (https://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cme…Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=10b6ayp:45:122)
    at Object.fireWith [as resolveWith] (https://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cme…Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=10b6ayp:46:431)
    at Object.deferred.(anonymous function) (https://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cme…Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=10b6ayp:47:790)

Deskana renamed this task from Cite dialog can't be closed when pasting something before it opens to Cite dialog can't be closed when pasting something extremely quickly before it opens.Oct 12 2017, 1:29 PM
Deskana moved this task from TR0: Interrupt to Freezer on the VisualEditor board.

I can't reproduce this anymore. I have also a newer Firefox version now, but I suppose it works also for older version now, feel free to close.

Deskana claimed this task.
Deskana changed the point value for this task from 1 to 0.

The performance improvements made in this area probably fixed this.