sumetENG45 / javachromiumembedded

Automatically exported from code.google.com/p/javachromiumembedded
0 stars 0 forks source link

tests.simple.MainFrame - cannot input text inside Java input field #121

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. On Windows, build latest JCEF revision 104
2. Run tests.simple.MainFrame
3. Click inside Java address field. Type characters.

What is the expected output? What do you see instead?
The characters don't go to the Java input field. Instead they go to the CEF 
browser.

Please provide any additional information below.

tests.detailed.MainFrame works because of the following code in 
ControlPanel.java

    address_field_.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseClicked(MouseEvent arg0) {
        KeyboardFocusManager.getCurrentKeyboardFocusManager()
            .clearGlobalFocusOwner();
        address_field_.requestFocus();
      }
    });

So does it mean that we must override every mouseClicked callback of every 
input widget? I don't remember that being necessary in previous version of JCEF 
r99 for example.

Original issue reported on code.google.com by christop...@gmail.com on 23 Sep 2014 at 6:25

GoogleCodeExporter commented 8 years ago
> JCEF r99 for example.
I meant r92. I don't know exactly when tests.simple.MainFrame stopped working.

Original comment by christop...@gmail.com on 23 Sep 2014 at 6:26

GoogleCodeExporter commented 8 years ago
Note this was working in JCEF revision 99. This was broken in revision 100, 
when issue 104 was added.

Original comment by christop...@gmail.com on 23 Sep 2014 at 6:51

GoogleCodeExporter commented 8 years ago
What is your opinion? Should apps embedding the Cef browser ensure every Java 
input widget mouseClicked callback be overriden as above? We're including 3rd 
party components so that's not really going to be an option in our case...

Focus/keyboard issues are always very delicate, will try to come up with 
suggestions...

Original comment by christop...@gmail.com on 23 Sep 2014 at 6:56

GoogleCodeExporter commented 8 years ago
For now in our app I'll use JCEF revision 104 minus the changes from revision 
100. This avoids the z-ordering pb (issue 120) and keyboard input (this issue).

Original comment by christop...@gmail.com on 23 Sep 2014 at 7:38

GoogleCodeExporter commented 8 years ago
This issue is a duplicate of issue 42. The attached patch is currently in 
review.

Original comment by k...@censhare.de on 24 Sep 2014 at 4:38

GoogleCodeExporter commented 8 years ago
... and a partial duplicate of issue 96

Original comment by k...@censhare.de on 24 Sep 2014 at 4:42

GoogleCodeExporter commented 8 years ago
Thanks for the pointers and that patch in issue 42. Getting focus right between 
AWT and CEF is tricky.

Original comment by christop...@gmail.com on 24 Sep 2014 at 9:15

GoogleCodeExporter commented 8 years ago
Marking this issue as a duplicate of issue #42 since it appears to be fixed 
with the change from that issue.

Original comment by magreenb...@gmail.com on 29 Sep 2014 at 4:37