Closed Bug 424627 Opened 16 years ago Closed 14 years ago

ctrl+clicking on a text field border followed by an editing operation (e.g. paste) removes the table cell from a non-editable document

Categories

(Core :: DOM: Selection, defect)

x86
All
defect
Not set
normal

Tracking

()

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

People

(Reporter: MatsPalmgren_bugz, Assigned: ehsan.akhgari)

References

()

Details

(Keywords: dataloss, testcase)

Attachments

(1 file)

I think this might be some variation of bug 339975 that still occurs:

STEPS TO REPRODUCE
1. load http://www.mozilla.org/projects/minefield/
2. copy a word of text to the clipboard
3. under "Give Feedback": hold CTRL down and left-click frenetically
   on the form controls and their labels and nearby on the background,
   occasionally press the 'V' key (while still holding CTRL)

ACTUAL RESULT
The table cell to the right of "E-mail:" that contains an <input> and
the text "(optional)" disappears from the page.
DOM Inspector shows whole <TD> is gone.

PLATFORMS AND BUILDS TESTED
Bug occurs in Firefox 2008032004 on Linux.
I can reproduce (in fact the input disappears if you CTRL+click+V exactly on its border). Note that I was able to reproduce bug 339975 symptoms on this page (I wasn't with bug 339975 testcase)

see http://img167.imageshack.us/img167/9140/screenshot001zx5.png

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b5pre) Gecko/2008032204 Minefield/3.0b5pre ID:2008032204

=> OS : all
OS: Linux → All
Blocks: 483951
Blocks: 522815
Better test case attachment 368203 [details] 
you can consistently reproduce this all time
Keywords: testcase
Whiteboard: test case attachment 368203
This is pretty bad.  Thanks Biju for coming up with the test case.
Assignee: nobody → ehsan
blocking2.0: --- → ?
Whiteboard: test case attachment 368203
(In reply to comment #4)
> Thanks Biju for coming up with the test case.
That credit goes to Atsushi Sakai (see Bug 462970 )
As well as thanks to oop.coder for finding the correct steps.

This need to be fixed ASAP. Other Corporate world dont forgive a case where there is data loss on the Form. Its the backbone of intranet.
Keywords: dataloss
The problem here is that nsTextControlFrame::GetDataForTableSelection is called, and the limiting node is the text area anonymous div, but we start the search from the textarea element, which means that the limiter check never kicks in, and we think that the user has clicked on a table cell, so the table cell is selected, and when pressing a key, the editor will delete the current selection, which includes the cell and the textarea as well.
Component: Editor → Selection
QA Contact: editor → selection
Summary: Ctrl+click and paste removes table cell from non-editable document → Ctrl+clicking on a textarea border followed by an editing operattion removes the table cell from a non-editable document
Summary: Ctrl+clicking on a textarea border followed by an editing operattion removes the table cell from a non-editable document → Ctrl+clicking on a text field border followed by an editing operattion removes the table cell from a non-editable document
Attached patch Patch (v1)Splinter Review
Attachment #487447 - Flags: review?(roc)
No longer blocks: 462970, 483951, 522815
Whiteboard: [has patch][needs review roc]
Whiteboard: [has patch][needs review roc] → [needs landing]
Summary: Ctrl+clicking on a text field border followed by an editing operattion removes the table cell from a non-editable document → ctrl+clicking on a text field border followed by an editing operation (e.g. paste) removes the table cell from a non-editable document
http://hg.mozilla.org/mozilla-central/rev/63e8d295610f
Status: NEW → 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: