Page MenuHomePhabricator

VisualEditor: Link inspector crashes when inserting link on non-linkable or empty selection
Closed, ResolvedPublic

Description

  • Edit a page
  • Put cursor at the end of a line
  • Go to toolbar and Insert new link
  • The input field is focussed, blur it by clicking somewhere inside the inspector outside the input field
  • Click the trash can (since there is no "x" close button, that's the closest I can find in the top left or right corner)
  • The inspector clears itself but stays behind (crashes half-way closing)

Uncaught Error: No class registered by that name: undefined ve.Factory.js:62
ve.Factory.create ve.Factory.js:62
ve.dm.SurfaceFragment.annotateContent ve.dm.SurfaceFragment.js:518
ve.ui.AnnotationInspector.onClose ve.ui.AnnotationInspector.js:162
ve.ui.Window.close ve.ui.Window.js:281
ve.ui.Inspector.onRemoveButtonClick ve.ui.Inspector.js:89
oo.EventEmitter.emit oo.js:421
ve.ui.IconButtonWidget.onClick ve.ui.IconButtonWidget.js:61
proxy load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20130715T175253Z:775
jQuery.event.dispatch load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20130715T175253Z:3058
elemData.handle.eventHandle

An empty inspector stays behind and the user can no longer interact with any links at this point. When doing anything (scrolling, typing) the inspector will hide. Except the bubble tip on top, that one stays behind...


Version: unspecified
Severity: critical

Details

Reference
bz51404

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:59 AM
bzimport set Reference to bz51404.

Note, this doesn't seem a race condition or anything. I'm giving it at least half a second to a second of time between each distinct action.

Created attachment 12854
Screenshot of problem

Attached:

Screen_Shot_2013-07-16_at_12.30.47_AM.png (432×780 px, 22 KB)

It could be just be, but I run into this quite often. Every time it happens the interface crashes unrecoverably and all work is lost.

I've just tested this and can reproduce it except for comment 3 - in my test I was able to do everything except link and the save worked as expected.

Bug 51415 is reporting the same JS error in the same component, with different steps to reproduce.

I can reproduce this by putting the cursor on a blank line (such as an empty page), clicking link inspector icon, then pressing key 'Esc'.

Change 76839 had a related patch set uploaded by Trevor Parscal:
The greatest commit in the history of the world*

https://gerrit.wikimedia.org/r/76839

Change 76839 merged by jenkins-bot:
Link inspector bug fixes

https://gerrit.wikimedia.org/r/76839

This is now merged and will be deployed later.

  • Bug 51984 has been marked as a duplicate of this bug. ***