Delete/backspace places the caret in the wrong location

RESOLVED DUPLICATE of bug 1257363

Status

()

Core
Editor
RESOLVED DUPLICATE of bug 1257363
4 years ago
2 years ago

People

(Reporter: Spocke, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
x86_64
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

4 years ago
Created attachment 8371337 [details]
backspace_enter_bug.html

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1809.0 Safari/537.36

Steps to reproduce:

1. Open the backspace_enter_bug.html file in Firefox 27+
2. Place caret after X
3. Press enter
4. Press backspace
5. Enter text
6. Observe that the text got placed after the paragraph

Or:
1. Open the backspace_enter_bug.html file in Firefox 27+
2. Place caret before X
3. Press enter
4. Press arrow up key
5. Press delete
6. Enter text
7. Observe that the text got placed above the paragraph


Actual results:

Caret is placed outside of the paragraph so the new text is added to an incorrect DOM location.


Expected results:

The caret should be placed within the paragraph and the text should be placed within the paragraph.
Clearly reproducible. Works OK in Chrome.
Might not be an editor problem, could be a layout problem, I'd have to look into it.
Some funny effects like in bug 1258085.

Reporter, are you saying that this worked before FF27?

Alice, could you please find a regression range here?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(spocke)
Flags: needinfo?(alice0775)
Keywords: regression
See Also: → bug 1258085
In my local build which includes the fix to bug 1257363 (another backspace problem), I can't reproduce the backspace problem reported here. Quite obviously, my patch fixes it.

The delete problem is still reproducible.
Depends on: 1257363
Created attachment 8734092 [details]
Simple test case for the delete case.

I can see what happens in the delete case.

The selection ends up *before* the paragraph. When you continue typing, the new test gets added outside the paragraph. It's better visible when you style the original paragraph in red.

Alice, I already have a fix in mind. I don't need an exact regression range. If this existed before - say - FF 12, let's not worry about the details.
OK, I've changed my mind. I'm forward duplicating this to bug 1257363. That already solves the backspace problem and I'll attach a fix for the delete problem in a few minutes.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Flags: needinfo?(spocke)
Flags: needinfo?(alice0775)
Keywords: regression
Resolution: --- → DUPLICATE
Duplicate of bug: 1257363
You need to log in before you can comment on or make changes to this bug.