Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361464 - DOM exception on cut
Summary: DOM exception on cut
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Editor (show other bugs)
Version: 0.3   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 minor (vote)
Target Milestone: 0.4 M1   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-19 15:41 EDT by Adam Peller CLA
Modified: 2011-12-01 17:00 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Peller CLA 2011-10-19 15:41:47 EDT
1. open minimaleditor.html
2. paste the following content into the buffer

http://pastebin.com/968e7WsX

3. select from the input to the /select
4. hit control-x / command-x to cut
5. there's an exception in cleanup where the child does not exist in _clientDiv. The native cut seems to remove it, so a (harmless) DOM exception occurs.
Comment 1 Felipe Heidrich CLA 2011-10-19 16:26:09 EDT
What browser and orion version ?

I fixed a bug similar to this in the past, it is race condition where the timer that runs updatePage() get executed  before the cleanUp() timer and removes the div. When tries to remove the div it throws an exception div is not in the clientDiv.
Comment 2 Felipe Heidrich CLA 2011-10-20 14:55:34 EDT
I did some investigation

To reproduce the problem we need to execute a cut operation that causes the view to scroll (to show the new location of the caret)

For that you can go to:
http://orion.eclipse.org/examples/textview/demo.html
create a java file
select a line that is bigger than the view (line 77 works for me)
cut

When the cut operation is over there will be two timers, one for the scroll event, and one for the cleanup
if the scroll handler runs first it calls updatePage() which removes  the div  - when the cleanup runs it fails.