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 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.

Event Timeline

Ryasmeen created this task.Dec 1 2015, 12:25 AM
Ryasmeen raised the priority of this task from to Needs Triage.
Ryasmeen updated the task description. (Show Details)
Ryasmeen added a project: VisualEditor.
Ryasmeen added a subscriber: Ryasmeen.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptDec 1 2015, 12:25 AM
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 Normal 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?

DLynch added a subscriber: DLynch.Dec 3 2015, 6:10 PM

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 closed this task as Resolved.Dec 16 2015, 2:09 PM
Esanders claimed this task.
DLynch claimed this task.Dec 16 2015, 5:35 PM
DLynch removed a project: Patch-For-Review.

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

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