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

Bug 335585

Summary: [editor][IE] Hit test is wrong when zoom size !== 100%
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: ClientAssignee: Project Inbox <e4.orion-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe, mamacdon
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description John Arthorne CLA 2011-01-27 11:02:03 EST
Build: N201101270200
Internet Explorer 8.0.7600.16385

When I click on text in the editor with the cursor, the caret jumps to the correct line, but stays in the same column it was in before I clicked. The result is that the caret and cursor are in different parts of the line, making selection with the mouse behave very strangely. I drag in one part of the screen and text is selected elsewhere on the line.
Comment 1 Felipe Heidrich CLA 2011-01-27 11:44:47 EST
Works for me on IE9, on IE8 I can't open a file see Bug 335590
Maybe you are getting the same error, but didn't noticed and kept on going?
Is that a new bug, or as it always being there for you ?
Comment 2 Felipe Heidrich CLA 2011-01-27 11:48:34 EST
I ignored the error (Bug 335590) and the editor opened. I can't see the bug you described. Everytime I click the caret moves to the right place (column and row).

I'm running all client side code from HEAD and server from N201101270200.
Comment 3 Felipe Heidrich CLA 2011-01-27 13:59:44 EST
Works for me on my Windows Vista + IE8
Build N201101270200

Is anyone else, besides John, having this problem ?
Comment 4 Mark Macdonald CLA 2011-01-27 14:37:51 EST
> Is anyone else, besides John, having this problem ?

IE 9.0.7390.16406 on Win7

I'm seeing this. When I click on a line, the caret does not jump to the correct column. It's offset by some random amount. After doing that, the caret & cursor are out of sync when I do a drag-to-select.
Comment 5 Felipe Heidrich CLA 2011-01-27 14:54:19 EST
(In reply to comment #4)
> > Is anyone else, besides John, having this problem ?
> IE 9.0.7390.16406 on Win7
> I'm seeing this. When I click on a line, the caret does not jump to the correct
> column. It's offset by some random amount. After doing that, the caret & cursor
> are out of sync when I do a drag-to-select.

Does it happen right off the bat for you when you open the editor (any file) ? Or do you need to do something beforehand to trigger the failure ?
Comment 6 Mark Macdonald CLA 2011-01-27 15:11:28 EST
> Does it happen right off the bat for you when you open the editor (any file) ?
> Or do you need to do something beforehand to trigger the failure ?

It's something to do with the Zoom Size. At 100%, everything is fine. But IE defaults to 115% (not sure why), and that's when the cursor starts going to the wrong column.
Comment 7 Felipe Heidrich CLA 2011-01-27 15:51:46 EST
Thank you Mark, that explains it.

This is a bad bug, but not a regression (no need to fix it for M5)
Comment 8 John Arthorne CLA 2011-01-27 16:58:33 EST
Yes, my IE is zoomed to 125% as well. Maybe I zoomed in at some point in the past, but it seems to preserve this across browser sessions.
Comment 9 Felipe Heidrich CLA 2011-02-02 13:30:24 EST
Fixed
http://git.eclipse.org/c/e4/org.eclipse.orion.client.git/commit/?id=a96c5ab5a8e4eaf679a00e9b56abe9e486a7f28b

The problem was in TextRange getClientRects, those TextRectangle were in  physical pixel size. It should not happen on IE8 but it does:

http://help.dottoro.com/ljxsdaqk.php
(read the box that says: Be careful about the getClientRects method!  )