Page MenuHomePhabricator

VisualEditor: Link does not get applied after concatenating a text to the existing link and reapplying the link
Closed, ResolvedPublic

Description

Screenshot

Steps to reproduce:

1.Open a page with VE

2.Insert a link

3.Now add a space and then a text next to it

4.Now delete the space and concatenate the text with the exiting link

5.Select the previous link and the text together

6.Re-apply the link

Observed Result:
The new link does not get applied and "Save Page" button remains disabled

See the screenshot attached

Test Environment: https://test2.wikipedia.org/
Browser: Chrome Version 26.0.1410.65
OS: MAC OS X 10. 8. 5
Page:https://test2.wikipedia.org/wiki/1staprilChrome?veaction=edit


Version: unspecified
Severity: normal

Attached:

Screen_Shot_2014-04-01_at_11.39.14_AM.png (548×1 px, 101 KB)

Details

Reference
bz63386

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:05 AM
bzimport set Reference to bz63386.

So the problem is:

If you select text that is partially linked and partially not linked (in this specific case, the first part is linked and the second part isn't), then open the link inspector, we inspect the existing link but don't extend the link. If you then close the inspector without changing the target, nothing happens, but if you close the inspector with a changed target, the link is extended.

So I guess that on opening the link inspector, we should aggressively extend the link?

This happens even if you dont delete the space and just select both the link and the text and then re-apply a new link.

Change 124006 had a related patch set uploaded by Esanders:
Apply annotations to partially annotated selections

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

Change 124006 merged by jenkins-bot:
Apply annotations to partially annotated selections

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

I can still reproduce it on Betalabs.So, reopening it.

The fix is not working for the following cases:

Case 1:

Steps to reproduce:

1.Open a page with VE

2.Insert a link where the target is an existing page

3.Now add a space and then a text next to it

4.Save the page

5.Reopen the page

6.Now delete the space

7.Select the previous link and the text together

8.Re-apply the link where the link target is a new page

Case 2:

Steps to reproduce:

1.Open a page with VE

2.Insert a link where the link target is a new page

3.Now add a space and then a text next to it

4.Save the page

5.Reopen the page

6.Now delete the space

7.Select the previous link and the text together

8.Re-apply the link where the link target is a different new page

Case 3:

1.Open a page with VE

2.Insert a link where the target is a new page

3.Now add a space and then a text next to it

4.Save the page

5.Reopen the page

6.Now delete the space

7.Select the previous link and the text together

8.Re-apply the link where the link target is an exiting page

In all the above three cases , the link does not get applied to the concatenated text

Change 125019 had a related patch set uploaded by Esanders:
Fix covering annotations logic

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

Change 125019 merged by jenkins-bot:
Fix covering annotations logic

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