moving by words is inconsistent

RESOLVED FIXED in mozilla22

Status

()

Core
Layout
RESOLVED FIXED
4 years ago
a year ago

People

(Reporter: surkov, Assigned: surkov)

Tracking

(Depends on: 1 bug, Blocks: 1 bug)

unspecified
mozilla22
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

4 years ago
Created attachment 727578 [details] [diff] [review]
testcase

Filing a bug under layout since it's nsIFrame::PeekOffset problem. But it's better to illustrate as a keyboard issue.

Navigation by words is inconsistent in editable container when it contains <br> or \n character as separator. For example:

<pre>
<div contentEditable="true">oneword

two words
</div>

<div contentEditable="true">oneword<br><br>two words</div>
</pre>

Windows: If you set up the caret at the beginning of text then "next word" is empty line in #1 case and "two" in #2 case.

Both cases work the same in Chrome. IE has totally different behavior (but consistent): it includes end of each line between words. If PeekOffset is fixed then it seems keyboard behavior will be the same as Chrome one which should be fine.

Mac works the same way (it moves to the end of word) not depending on markup and works same way in Chrome/Safari.
(Assignee)

Comment 1

4 years ago
Created attachment 729495 [details] [diff] [review]
patch

test_movement_by_words.html "Set .rc to <b>'</b>quiz'" was corrected
previously: 6 stops, after (from left to right) "'" of b, after "to", before "to", before "rc", after "Set", before "Set"
now: 4 stops, after (from left to right) "'" of b, before "to", before "rc", before "Set"

(btw behavior is the same in Chrome)
Attachment #729495 - Flags: review?(roc)
Attachment #729495 - Flags: review?(roc) → review+
(Assignee)

Comment 2

4 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/3f46962ff0ce
Flags: in-testsuite+
(Assignee)

Updated

4 years ago
Assignee: nobody → surkov.alexander
https://hg.mozilla.org/mozilla-central/rev/3f46962ff0ce
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22

Updated

a year ago
Depends on: 1232322

Updated

a year ago
Depends on: 1254379

Updated

a year ago
No longer depends on: 1254379
You need to log in before you can comment on or make changes to this bug.