Closed Bug 853361 Opened 11 years ago Closed 11 years ago

moving by words is inconsistent

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: surkov, Assigned: surkov)

References

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

Details

Attachments

(2 files)

Attached patch testcaseSplinter Review
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.
Attached patch patchSplinter Review
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)
Assignee: nobody → surkov.alexander
https://hg.mozilla.org/mozilla-central/rev/3f46962ff0ce
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Depends on: 1232322
Depends on: 1254379
No longer depends on: 1254379
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: