Closed Bug 612271 Opened 14 years ago Closed 14 years ago

Cursor jumps back to the end of the previous line after pressing enter at the end of a textarea managed by the jQuery autoResize plugin

Categories

(Core :: DOM: Editor, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b8
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: symphonicheaven, Assigned: ehsan.akhgari)

References

()

Details

(Keywords: regression, testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101115 Firefox/4.0b8pre
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101115 Firefox/4.0b8pre

Pretty sure this happened after the new JS backend landed a while back, since I didn't have this problem with Firefox 3.6.

Essentially, what happens is that once the textarea automatically resizes, every time you press Enter to make a new line, Minefield will jump up to the previous line instead of staying on the new line.

Reproducible: Always

Steps to Reproduce:
1. After loading the webpage, click on the end of the text in the textbox.
2. Press Enter.
3. After pressing Enter a few times, the problem should reveal itself.
Actual Results:  
Cursor "jumps" back up to the previous line instead of staying on the new line.

Expected Results:  
Cursor should stay on the new line.
blocking2.0: --- → ?
Mozilla/5.0 (Windows NT 6.1; rv:2.0b8pre) Gecko/20101114 Firefox/4.0b8pre 

I can confirm this also on yesterday's nightly.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Ehsan, maybe bug 597331?
blocking2.0: ? → betaN+
foojkdjkfdjkfjkdjfkdjkfjkdjfkjdkfjkdjkfjdkfjk
Component: General → Editor
Product: Firefox → Core
QA Contact: general → editor
(In reply to comment #3)
> Ehsan, maybe bug 597331?

Yep, that's definitely the culprit.

(In reply to comment #4)
> foojkdjkfdjkfjkdjfkdjkfjkdjfkjdkfjkdjkfjdkfjk

I'm sorry David, but I can't really parse that!  ;-)
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Summary: jQuery autoResize plugin regression in Firefox 4.0 → Cursor jumps back to the end of the previous line after pressing enter at the end of a textarea managed by the jQuery autoResize plugin
Blocks: 597331
Keywords: regression
Actually, this is really a regression from bug 240933 <http://hg.mozilla.org/mozilla-central/rev/c3236786510b>; it's only being exposed by bug 597331.

The root cause is that nsTextControlFrame::OffsetToDOMPoint violates the invariant that the selection must be set on the trailing BR node if it's at the end of the text.
Blocks: 240933
No longer blocks: 597331
Attached patch Patch (v1)Splinter Review
Attachment #495760 - Flags: review?(roc)
Whiteboard: [needs landing]
http://hg.mozilla.org/mozilla-central/rev/1655a76ea188
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs landing]
Target Milestone: --- → mozilla2.0b8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: