Page MenuHomePhabricator

VisualEditor: ve.ui.FragmentInspector immediately closes after opening on Opera 12, when opened using the context tooltip
Closed, DeclinedPublic

Description

The inspector for <syntaxhighlight /> node immediately closes after opening on Opera 12. I don't yet know why, but I am going to find out.


Version: unspecified
Severity: normal

Details

Reference
bz67530

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:34 AM
bzimport set Reference to bz67530.

When you try opening the inspector:

  • The 'focusout' event is eventually fired on .ve-ce-surface-paste
  • ve.ce.Surface.prototype.onFocusChange is called
  • On Opera 12 rangy.getSelection( this.getElementDocument() ).anchorNode is null, but on other browsers it returns the .ve-ce-surface-paste element
  • Therefore hasFocus is false instead of true
  • The document gets blurred, which triggers the inspector to hide some ten levels of abstraction down.

No idea why the selection gets lost. Perhaps the inspector should reselect?

(In reply to Bartosz Dziewoński from comment #1)

  • On Opera 12 rangy.getSelection( this.getElementDocument() ).anchorNode is null, but on other browsers it returns the .ve-ce-surface-paste element

Oh, and I forgot the best part: not always. Sometimes the selection is the same as on other browsers. I've somehow caused that several times when debugging, but I have absolutely no idea how.

Ooh. It only closes itself when opened by clicking the context tooltip. Opening it by double-clicking the node or by pressing Enter when it's selected keeps the inspector open.

After editing it, when the context tooltip is displayed again, clicking it also will always work correctly. Fascinating.

Also affects the comment inspector in standalone.

Seems to have been fixed at some point, I can no longer reproduce.