Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351242 - [client][editor] error on firefox on mac holding commad+v down
Summary: [client][editor] error on firefox on mac holding commad+v down
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-05 17:03 EDT by Felipe Heidrich CLA
Modified: 2011-09-01 11:42 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felipe Heidrich CLA 2011-07-05 17:03:49 EDT

    
Comment 1 Felipe Heidrich CLA 2011-07-05 17:06:15 EDT
On mac/firefox


run demo.html
create the text view
copy something
hit command+p and hold it down
the content is paste multiple times in the view as it should
but we also get a bunch of errors in the console
Node was not found" code: "8
[Break On This Error] self._clientDiv.removeChild(child);
textView.js (line 3046)
Comment 2 Felipe Heidrich CLA 2011-07-06 12:52:16 EDT
The repeat key is sending paste events very fast. The problem happens when a second paste events comes in before the getText timeout of the first event.

This is the order

1st paste event
-- create a pre element (child0) and select it
-- set timeout (timeout0) in zero
-- return to ua, ua executes the paste operation on child0
2nd paste event
-- create a pre element (child1) and select it
-- set timeout (timeout1) in zero
-- return to ua, ua executes the paste operation on child1
timeout0 runs
-- get the pasted text in child0
-- remove child0 from parent
-- add the text to view
timeout1 runs
-- get the text from child1
-- try to remove child1 from parent and fails.
At this point parent is NULL
This happens because updateRun() ran at the end of the timeout0 and removed all unnecessary nodes from the parent (including child1).

I suspect we can just fix that by testing parent === NULL
- it won't leak causes child1 is getting removed
- the paste works