| Summary: | [editor] FF4 - ctrl-V stops working and then I get console errors | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Susan McCourt <susan> | ||||
| Component: | Client | Assignee: | Felipe Heidrich <eclipse.felipe> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | eclipse.felipe, Silenio_Quarti, simon_kaegi | ||||
| Version: | 0.2 | ||||||
| Target Milestone: | 0.2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
In case it matters, here is the text I'm trying to copy/paste. These are the first three lines in the file: - consider a "put editor location in browser history" command - URL hash for token within a line, polish global search (where the empty line under the two lines is the third line). I am late for a meeting but will try to give more detail later if needed. I would not duplicate this bug on firefox 4.0.1 (are you also on FF 4.0.1/Windows ?) Could you please try to add a null check to the code this line while (nodeChild !== endNode) (line number 3026) to while (nodeChild && nodeChild !== endNode) Thanks (In reply to comment #2) > I would not duplicate this bug on firefox 4.0.1 (are you also on FF > 4.0.1/Windows ?) yes, FF 4.01 on Win7 I can duplicate it at will. Always happens when the third empty line is the last thing selected in the copy. If I copy a fourth line, that has content, the problem does not occur. And if I copy only the two lines, the problem does not occur. > > Could you please try to add a null check to the code > this line > while (nodeChild !== endNode) (line number 3026) > to > while (nodeChild && nodeChild !== endNode) > > Thanks This fixes the problem. With that change, I can perform copy/paste for the scenario with the third line selected. Created attachment 197539 [details]
text file
this was the text file (my m8 todo list) where I saw the problem.
Try to select the first three lines and then ctrl-v to somewhere else in the file.
(It didn't seem to matter where you were pasting to).
Works for me with todos.txt (copy and paste works, no error in the console) Try the null pointer check I mention in comment 2, if that fixes the problem for you feel free to commit it. See comment #3. (I tried it before and it fixed the problem). Silenio, we should release the null check, agreed ? (In reply to comment #7) > Silenio, we should release the null check, agreed ? I am ok with the null check if the pasted text is correct/complete. (In reply to comment #8) > (In reply to comment #7) > > Silenio, we should release the null check, agreed ? > > I am ok with the null check if the pasted text is correct/complete. yes, the pasted text was correct. |
- i was editing a file, using copy/paste, all was good - decided to move some stuff around - selected first three lines of file (the third line is blank) - ctrl-c - scroll down - ctrl-v No paste and I see this error in the console nodeChild is null getNodeText(node=pre)textView.js (line 3027) _getText()textView.js (line 3037) (?)()textView.js (line 3055) [Break On This Error] if (nodeChild.nodeType === child.TEXT_NODE) { textView.js (line 3027) At that point I have to reload the page to get the editor working again. If my selection doesn't include the third empty line, it works.