Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 411247

Summary: Copy/Paste blocks of text in Orion editor causes the cursor/selection to out of alignment
Product: [ECD] Orion Reporter: Chris McGee <sirnewton_01>
Component: EditorAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: gheorghe, mamacdon, Silenio_Quarti, simon_kaegi
Version: 3.0Flags: gheorghe: review+
simon_kaegi: review+
Target Milestone: 3.0 RC3   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
fix none

Description Chris McGee CLA 2013-06-20 09:09:37 EDT
For a bit of context, I am using firefox 21 and 13/14 point font in the editor preferences. I am also using a snapshot of the Orion 3.0 code base from git from a week or two ago so perhaps this is already fixed.

When I select a medium sized block of text (~20-30 lines) and paste it somewhere else in the same editor I begin to notice my cursor going out of alignment with the insertion point and selection. For instance, I will click on a line and notice that the insertion point is placed on the line above. When I drag to select some text the selection appears to be above my cursor.

Refreshing the browser page doesn't help. The only way I know to get back to a sane state is to change the editor's font preference back and forth between 13/14 point a couple of times.
Comment 1 Mark Macdonald CLA 2013-06-20 09:32:16 EDT
I see this in master using Firefox 22, so it does not appear to be fixed
Comment 2 Silenio Quarti CLA 2013-06-20 10:25:20 EDT
Created attachment 232599 [details]
fix
Comment 3 Silenio Quarti CLA 2013-06-20 10:38:07 EDT
The problem happens because Firefox is change the scrollTop of the editor clipDiv.  The fix is to reset it to 0 during the editor update.

Refresh of the page does not help because FF remembers the scroll offset.

Fixed
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=148c83553e8296d1d5cd16eb8c5f4f4cf45fde6a
Comment 4 Silenio Quarti CLA 2013-06-20 10:38:17 EDT
.