phabricator.wikimedia.org

⚓ T115001 Model and view out of sync when link deleted and replaced with text

  • ️Thu Oct 08 2015

Model and view out of sync when link deleted and replaced with text

Closed, ResolvedPublic8 Estimated Story Points

It is really great how VE now communicates whether you are inside the link context or outside of it as you edit a link element.

It works quite well in general but I found a small issue worth documenting.
When adding an external link by pasting it into the document, the next action is to rename the label. If the label is removed character by character until the item is empty you can still add the new label. But as soon you continue editing somewhere else, the link gets lost.

I captured that in an animated gif for more clarity:

link-issue.gif (300×480 px, 67 KB)

I tried alternative approaches like editing the label first or even selecting it with a double-click, and both worked well.

Event Timeline

Pginer-WMF raised the priority of this task from to Needs Triage.

Esanders renamed this task from Link context lost after renaming external link to Model and view out of sync when link deleted and replaced with text.Oct 26 2015, 3:54 PM

Comment Actions

Not limited to link annotations, get the same issue with bold (in Chrome)

Comment Actions

Hmm, this is happening because the model's context-based annotation inference fails if the model context does not have any text with the link annotation.

It would be fixed by the approach of https://gerrit.wikimedia.org/r/247800/ , but perhaps we should special-case this immediately by saving the annotation inside the link DOM element.

Comment Actions

BTW this looks like a special case of T116269 but isn't - the difference is in this case, the actual link element remains in the DOM, whereas in T116269, the browser-native preannotation system inserts a new, confusingly similar element.

Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct. · Wikimedia Foundation · Privacy Policy · Code of Conduct · Terms of Use · Disclaimer · CC-BY-SA · GPL · Credits