Menu

#62 JWebBrowser focus problem with alerts

v1.0_(example)
open
nobody
1
2012-10-08
2012-09-24
No

Hi Christopher,

I'm trying to upgrade app to xulrunner 10. The basics are working quite nice, but there is an anoying bug with focus handling in combination with alert boxes.
For better reproduction I've added a little test html page.

instruction:

  1. start the demo browser with swt > 4.2 and any xulrunner 10 release
  2. navigate the demo browser to the test html
  3. type something into the input field and hit <enter></enter>
  4. for text input not equal to "OK" a alert should be displayed.
  5. after confirming the alert the input field should still have focus and it should be possible to type directly -> BUT: instead the native control lost the focus although the focus indicator (cursor) is still set. When you try to manually set the focus on the input by mouse click, no reaction (cursor, but no input accepted)
1 Attachments

Discussion

  • Johann Hubert Sonntagbauer

    I'm so sorry for the poor bug description quality, but I'm not able to edit the post any more -> sourceforge shame on you!

    therefore I've posted the fixed description below

    Hi Christopher,

    I'm trying to upgrade my app to xulrunner 10. The basics are working quite nice, but there is an annoying bug with focus handling in combination with alert boxes.
    For better reproduction I've added a little test html page.

    instruction:

    1. start the demo browser with swt > 4.2 and any xulrunner 10 release
    2. navigate the demo browser to the index.html
    3. type something into the input field and hit <enter></enter>
    4. for text input not equal to "OK" an alert should be displayed.
    5. after confirming the alert the input field should still have focus and it should be possible to type directly

    -> BUT:
    instead the native control lost the focus although the focus indicator (cursor) is still set.
    So if you type something, the input will not be accepted by the input field. When you try to manually set the focus on the input by mouse click, no reaction. The focus indicator is still present, but the component doesn't get the "real" focus.
    One workaround is to select another control and reselect the input which is very annoying.

    I've checked the test html with the SWT examples (SWTBrowser and SWTAWTBridge) there the behaviour works as expected.

     

    Last edit: Johann Hubert Sonntagbauer 2012-10-01
  • Johann Hubert Sonntagbauer

    after some research i can definitly pin down the problem to the very confusing focus handling in combination with AWT_SWT bridge.
    Therefore I've created a SWT bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=390806

     
  • Christopher Deckers

    I was about to say that it might be a Java 7 issue when I saw your comment in the bug report.
    So to sum up, Java 7 causes awful focus issues, and SWT with XULRunner also has focus issues. Well, I hope the SWT developers are going to do something about it some day...

    -Christopher

     

Log in to post a comment.

MongoDB Logo MongoDB