Page MenuHomePhabricator

Trim selections with whitespace on the end when annotating
Closed, ResolvedPublic

Description

If you highlight, for example, the first word in this sentence in the VE, you'll highlight "If " rather than "If". Highlight-and-bold or highlight-and-italicise are common workflows, and adding the closing markup after the space is suboptimal for linking or for future users of a page who will use source editing.


Version: unspecified
Severity: enhancement

Details

Reference
bz51023

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:03 AM
bzimport set Reference to bz51023.

(In reply to comment #0)

If you highlight, for example, the first word in this sentence in the VE,
you'll highlight "If " rather than "If". Highlight-and-bold or
highlight-and-italicise are common workflows, and adding the closing markup
after the space is suboptimal for linking or for future users of a page who
will use source editing.

This isn't necessary; it's caused by the user selecting the space. Do you suggest that we crop these accidentally-selected spaces out? What if the user meant to select them? Are they just screwed at this point? This feels sub-optimal.

In what situation would a user want to italicise or link the space at the end of a highlight?

I mean, I can see an argument for space highlighting when someone is (for example) deleting text, but...

Change 177533 had a related patch set uploaded (by Jforrester):
Trim whitespace when annotating

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

Patch-For-Review

Jdforrester-WMF renamed this task from VisualEditor: Trim selections with whitespace on the end to Trim selections with whitespace on the end when annotating.Dec 5 2014, 7:38 PM
Jdforrester-WMF assigned this task to Esanders.
Jdforrester-WMF moved this task from Freezer to Blocked on the VisualEditor board.
Jdforrester-WMF set Security to None.
Jdforrester-WMF closed this task as Resolved.Dec 13 2014, 1:50 AM
Jdforrester-WMF moved this task from Blocked to Q4 on the VisualEditor board.