Page MenuHomePhabricator

Special character insertion replaces selected content (including focusable nodes)
Closed, DeclinedPublic

Description

Steps to reproduce:

1.Open a page with VE
2.Select a gallery
3.Open the Special character inserter
4.Select a character

Observed Result:
Unlike other elements like math/hiero/image which gets placed right after the gallery even if it is selected, in this case the special character replaces the whole gallery.
The behavior should be uniform for all cases.

Test Environment: https://test2.wikipedia.org/
Browser: Chrome Version 26.0.1410.65 & FF 25
OS: MAC OS X 10. 8. 5
Page:https://test2.wikipedia.org/w/index.php?title=3rdfebFF&veaction=edit


Version: unspecified
Severity: normal

Details

Reference
bz60802

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:51 AM
bzimport set Reference to bz60802.

This is not a gallery specific issue ,it happens for other elements too.For Example: if you select an image or a text and Insert special character , it replaces the selection with special character.

matmarex renamed this task from VisualEditor: Special Character replaces the whole gallery when the character inserter is opened while selecting the gallery to Special character insertion replaces selected content (including focusable nodes).Apr 21 2015, 6:58 AM
matmarex set Security to None.

According to T60118 this is intentional, but I think we should reconsider, especially given T65227: Quotation marks added via special characters tool should wrap selected text, not replace it. WikiEditor's special character inserter has the same behavior, though.

Jdforrester-WMF claimed this task.

If it's a wrapper, we add it top/tail like you'd expect; if it's a non-wrapper character, we replace, which I think is fine.