Page MenuHomePhabricator

Clicking the 'remove' button in the link context doesn't work if the cursor is at the beginning of the link text
Closed, ResolvedPublic8 Estimated Story Points

Description

Steps to reproduce:

  1. Open a page with VE which has link in it
  2. Place the cursor at the beginning of the link text
  3. Now click on the remove link icon

Observed Result:
It does not remove the link from the text.

Screen Shot 2015-11-30 at 4.25.01 PM.png (244×583 px, 22 KB)

Event Timeline

Ryasmeen raised the priority of this task from to Needs Triage.
Ryasmeen updated the task description. (Show Details)
Ryasmeen added a project: VisualEditor.
Ryasmeen subscribed.
Jdforrester-WMF renamed this task from Cannot remove link if the cursor is at the beginning of the link text to Clicking the 'remove' button in the link context doesn't work if the cursor is at the beginning of the link text.Dec 1 2015, 8:06 PM
Jdforrester-WMF triaged this task as Medium priority.
Jdforrester-WMF set Security to None.
Jdforrester-WMF edited a custom field.
Jdforrester-WMF moved this task from To Triage to Needs Discussion/Analysis on the VisualEditor board.

Delving into this, in ve.ui.AnnotationContextItem.prototype.onClearButtonClick, fragment is correct in both circumstances but fragment.getAnnotations( true ) doesn't return the right thing. I guess ve.dm.SurfaceFragment#getAnnotations needs to be updated to have a method of asking if it's "inside" or "outside" when at the start of a link/other 'cursored' annotation? @dchan?

Definitely has a conceptual relationship to T114376.

Definitely has a conceptual relationship to T114376.

Indeed.

Change 259216 had a related patch set uploaded (by DLynch):
Annotation context items: expand the selection if no annotations

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

Esanders claimed this task.

Change 259216 merged by jenkins-bot:
Annotation context items: expand the selection if no annotations

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