Closed
Bug 1024848
Opened 10 years ago
Closed 10 years ago
[Text Selection] Enable selection carets sanity test on Windows browser
Categories
(Core :: DOM: Selection, defect)
Core
DOM: Selection
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: TYLin, Assigned: TYLin)
References
Details
Attachments
(2 files)
(deleted),
patch
|
mdas
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mdas
:
review+
|
Details | Diff | Splinter Review |
Long press to select a word has different behavior on Windows. For example, if we have a <input> containing "abc def ghi", long press on the character 'e' selects "def" on Linux. However, on Windows, it selects "def ", i.e. the word "def" with all the spaces afterward.
Assignee | ||
Updated•10 years ago
|
Blocks: CopyPasteLegacy
Assignee | ||
Comment 1•10 years ago
|
||
On Windows, when selecting a word by long pressing, extra spaces after
the word will also be selected. To solve this problem, I redesign the
test cases by comparing the target content with the selected content
directly while ignoring spaces at certain test cases. I believe it's
easier to understand and less error-prone than the old
replace-selected-content-and-compare way.
I added a new method SelectionManager.selected_content() to make it
easier to get the current selected text.
Attachment #8439800 -
Flags: review?(mdas)
Assignee | ||
Comment 2•10 years ago
|
||
Try opt (Mnw, Gu, Mn): https://tbpl.mozilla.org/?tree=Try&rev=d40edd0baa7e
Try debug (Mn): https://tbpl.mozilla.org/?tree=Try&rev=5046738b3485
Attachment #8439801 -
Flags: review?(mdas)
Updated•10 years ago
|
Attachment #8439800 -
Flags: review?(mdas) → review+
Comment 3•10 years ago
|
||
Comment on attachment 8439801 [details] [diff] [review]
part 2 - Enable selection carets sanity tests on Windows browser (v1)
Review of attachment 8439801 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks so much for these great patches!
Attachment #8439801 -
Flags: review?(mdas) → review+
Updated•10 years ago
|
Keywords: checkin-needed
Comment 4•10 years ago
|
||
(In reply to Ting-Yu Lin [:TYLin] (UTC+8) from comment #1)
> On Windows, when selecting a word by long pressing, extra spaces after
> the word will also be selected.
I also see double clicks doing this. This behavior seems suboptimal to me (selecting words is pretty useful); is it something we can control?
Assignee | ||
Comment 5•10 years ago
|
||
(In reply to Emanuel Hoogeveen [:ehoogeveen] from comment #4)
> (In reply to Ting-Yu Lin [:TYLin] (UTC+8) from comment #1)
> > On Windows, when selecting a word by long pressing, extra spaces after
> > the word will also be selected.
>
> I also see double clicks doing this. This behavior seems suboptimal to me
> (selecting words is pretty useful); is it something we can control?
I double click on a word in Notepad, Word, and IE. They all select a word and all the subsequent spaces. I think this is the default behavior on Windows. The only exception I found is Google Chrome (version 35) on Windows. It does not select those spaces after the word.
Comment 6•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b26ccba8deb8
https://hg.mozilla.org/integration/mozilla-inbound/rev/589789cf7bf8
Keywords: checkin-needed
Comment 7•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b26ccba8deb8
https://hg.mozilla.org/mozilla-central/rev/589789cf7bf8
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Assignee | ||
Comment 8•10 years ago
|
||
As Morris Tseng points out, we have a preference "layout.word_select.eat_space_to_next_word" defaults to false but it's overrided to true on Windows in all.js. That's why the word selection behavior is different on Windows.
http://dxr.mozilla.org/mozilla-central/source/modules/libpref/src/init/all.js
You need to log in
before you can comment on or make changes to this bug.
Description
•