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

Bug 336600

Summary: [hovering] Caret lost when selecting text in the Javadoc hover and then click into editor
Product: [Eclipse Project] Platform Reporter: sameer <sameer>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: anders.sorby, daniel_megert, eclipse.felipe, grant_gayed, gsingh_2011, jacobglass1, markus.kell.r, mayankk, peter, pwebster, Silenio_Quarti
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
patch
none
patch none

Description sameer CLA 2011-02-08 05:58:37 EST
Build Identifier: 20100917-0705

Cursor disappears after scrolling and selecting text in the JavaDoc hover that gets shown through content assist.

Operating system details - 
Happens with Win-XP/IE8 and Win 7
Does not happen with Win-XP/IE6.

Reproducible: Always

Steps to Reproduce:
1. Create a Java Class and type Has
2. Press ctrl+space after Has, code hints appears.
3. Click on the first hint - HashMap. The Javadoc hover will be shown next to the code hint pop-up.
4. Click on the Javadoc hover, scroll down and then select a few lines in the doc hover.
5. Click anywhere in the Java Editor.

Result: The cursor disappears.

Workaround - 
1. Press Insert key.
OR 
2. Click on any other view and then click on the Editor
Comment 1 Dani Megert CLA 2011-02-08 08:08:31 EST
Looks like a Browser widget issue. See also bug 235090.
Comment 2 Dani Megert CLA 2011-02-08 08:12:54 EST
Important part is to make a selection in the Javadoc hover. This is broken (with IE8) since at least 3.4.
Comment 3 Dani Megert CLA 2012-08-22 03:59:45 EDT
*** Bug 387738 has been marked as a duplicate of this bug. ***
Comment 4 Dani Megert CLA 2013-07-29 07:18:29 EDT
Also happens on IE 9 and using R4.3.

Silenio, was the fix in bug 403559 IE7 specific?
Comment 5 Dani Megert CLA 2013-07-29 07:18:47 EDT
*** Bug 413877 has been marked as a duplicate of this bug. ***
Comment 6 Silenio Quarti CLA 2013-07-29 11:58:12 EDT
(In reply to comment #4)
> Also happens on IE 9 and using R4.3.
> 
> Silenio, was the fix in bug 403559 IE7 specific?

Fix was not IE7 specific.   I cannot reproduce this bug on IE10 following the steps of comment#0, but I can reproduce with the steps from bug#413877. This time, it does not seem to be related to UIDeactivate(), since I can comment that line and the problem still happens.
Comment 7 Silenio Quarti CLA 2013-07-29 12:47:42 EDT
Created attachment 233899 [details]
patch

This patch fixes bug#413877. Dani, please could you try it and see if it fixes this problem as well?
Comment 8 Dani Megert CLA 2013-07-30 06:53:17 EDT
(In reply to comment #7)
> Created attachment 233899 [details] [diff]
> patch
> 
> This patch fixes bug#413877. Dani, please could you try it and see if it
> fixes this problem as well?

It does not fix bug 413877 for me (using IE 9). I get this ouptut:

0 3475726 3475726
0 3475726 3475726
FIXING2
6623278 6623278 6623278
6623278 6623278 6623278
=>0 6623278 6623278
FIXING1


However, I can no longer reproduce this bug here (as per comment 0).
Comment 9 Dani Megert CLA 2013-07-30 06:59:23 EDT
While testing this I found an even worse problem where the caret is there, one can type but the part is not active ==> most key bindings broken. For now, I filed this against Platform UI, but it might well be a related Browser widget focus issue. See bug 413977 for details/steps.
Comment 10 Silenio Quarti CLA 2013-07-30 17:32:13 EDT
Created attachment 233957 [details]
patch

Here is another attempt.  I cannot reproduce bug 336600, bug 413977 and bug 403559 after this patch (on IE9).  The code got complicated and I am not sure it is reliable.
Comment 11 Dani Megert CLA 2013-07-31 08:50:08 EDT
(In reply to comment #10)
> Created attachment 233957 [details] [diff]
> patch
> 
> Here is another attempt.  I cannot reproduce bug 336600, bug 413977 and bug
> 403559 after this patch (on IE9).  The code got complicated and I am not
> sure it is reliable.

I still see the two open bugs on my 64-bit Windows 7 machine with IE 9, SWT from 'master' and PDE Target set to eclipse-SDK-N20130730-2000-win32-x86_64.

Bug 413977:
OnUIDeactivate caret=11537370 11537370
OnUIDeactivate caret=11537370 11537370
onFocusOut
onFocusOut

Bug 336600:
onFocusOut
OnUIDeactivate caret=0 9963484
onFocusOut
FIXING 2=9963484
OnUIDeactivate caret=3278806 3278806
onFocusOut
FIXING 1=3278806
FIXED
Comment 12 Dani Megert CLA 2013-07-31 08:51:36 EDT
Exact steps to reproduce bug 3366600:
1. start with a new workspace
2. close 'Welcome' page
3. bring the 'Javadoc' view to front by clicking on its view tab
4. paste this into the 'Package Explorer':
public class C extends Object {}
5. put caret behind "C" ==> "C<caret>"
6. with the mouse select "C" in the 'Javadoc' view
7. with the mouse left-click into "Object" (click somewhere around 'j')
==> caret lost
Comment 13 Dani Megert CLA 2013-07-31 08:52:14 EDT
More details to my installed browser:
Is JavaScript enabled? Yes
Are Cookies enabled? Yes
Is Flash installed? Flash 11.8 is installed 
Is Java installed? Java 7 (uNaN) is installed
Comment 14 Dani Megert CLA 2014-01-03 04:32:14 EST
*** Bug 424557 has been marked as a duplicate of this bug. ***
Comment 15 Eclipse Genie CLA 2020-02-11 12:21:21 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.