Open Bug 420045 Opened 17 years ago Updated 5 years ago

Keyboard movement incorrect when collapsed selection is between nodes

Categories

(Core :: DOM: Selection, defect, P5)

PowerPC
macOS
defect

Tracking

()

People

(Reporter: tr, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; ja-JP-mac; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; ja-JP-mac; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12 When a page has designMode enabled, and a cursor is displayed, the cursor moves to the wrong location when the RIGHT (39) key is pressed. Reproducible: Always Steps to Reproduce: 1. Create an HTML file with the following source: <html> <head> <title>firefox bug?</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript"> window.onload = function(e) { document.designMode = "On"; var sel = window.getSelection(); var div = document.getElementsByTagName("div")[1]; sel.collapse(div, 2); div.focus(); } </script> </head> <body> <div>This is a test.</div> <div>First, make sure that the <span>cursor</span> is at the end of the word <code>cursor</code>.</div> <div>Now, press the right arrow key to see where the <span>cursor</span> moves.</div> <div>In Safari, it moves to the next caret position.</div> <div>In FF 2.0.0.12, it moves to the second letter of the word <span>cursor</span>.</div> <div>Is this a bug?</div> </body> </html> 2. Record the position of the cursor. 3. Press the RIGHT key (which = 39). Actual Results: The cursor moves to the position between the first and second characters of the word "cursor". Expected Results: The cursor should move to the position between the next space character and the letter "i". Says ss in the #firefox channel: (fwiw, I see it in Firefox 3 beta 3 as well)
Component: Keyboard Navigation → Selection
Product: Firefox → Core
QA Contact: keyboard.navigation → selection
I don't see any obvious dupes. Confirming. This happens using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b5pre) Gecko/2008031015 Minefield/3.0b5pre as well. Possibly related to bug 377297?
Severity: normal → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
This is yet another case where nsFrameSelection::GetFrameForNodeOffset() sucks. See the last paragraph of bug 322547 comment 6, and bug 363198 comment 30 (unfortunately I lost the work I mentioned there, and I don't even remember exactly what my plan was).

Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority.

If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.

Severity: minor → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: