Last modified: 2013-05-19 15:51:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T50487, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48487 - VisualEditor: Auto-selection covers adjacent text over punctuation
VisualEditor: Auto-selection covers adjacent text over punctuation
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Data Model (Other open bugs)
unspecified
All All
: Low normal
: VE-deploy-2013-05-27
Assigned To: Ed Sanders
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-15 02:01 UTC by Matthew Flaschen
Modified: 2013-05-19 15:51 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Matthew Flaschen 2013-05-15 02:01:54 UTC
This seems weird to me, but it still might be intentional.

If you put the caret immediately after a sentence ending in a period (e.g. the last sentence of the lede from https://en.wikipedia.org/w/index.php?title=Kono_Statement_of_1993&oldid=546398254&veaction=edit), then click the Link button, it tries to link the last word, including the punctuation.

I would expect it to let you create an new link, without assuming any existing anchor.
Comment 1 James Forrester 2013-05-16 18:08:27 UTC
This is indeed intentional (and took some time to get right). If the cursor is in, or directly adjacent to, a word, so that you can link a word quickly as a keyboard user without having to use a mouse or do keyboard-based shift-selection.

However, this is meant to not trigger when you're not in the "context" of a word, so it does some fancy language-dependent Unicode whitespace detection; it should be doing this for punctuation but apparently isn't, so referring to Ed to investigate.
Comment 2 Ed Sanders 2013-05-18 14:43:32 UTC
Bug.

Because null (the value we get for the end of the sentence) is silently converted to the string 'null' by RegExp#test (!?) and so we think it's an 'ALetter' which triggers the ALetter-MidNumLet-ALetter rule for mid-word punctuation, and so no break is returned.
Comment 3 Gerrit Notification Bot 2013-05-18 14:48:06 UTC
Related URL: https://gerrit.wikimedia.org/r/64481 (Gerrit Change I2408229cddd876ff8fe55a9eddf9bac87a61457e)
Comment 4 James Forrester 2013-05-19 15:51:23 UTC
Merged in master; will go out as part of wmf5.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links