To generate the issue (latest dj + swt4.3 + java 1.8 current + IE 11.0)
add a simple swing JTextField to a simple djbrowser test example application. (Simple Web Browser example in the demo for example).
add an awt TextField to the application.
navigate the dj browser to google.com or set the html content to <html><input type="text"></html>
focus to the input field on the djbrowser.
focus to the swing text field. try typing a character which needs alt key combination for example @ or |. It will fail.
focus to the awt textfield and focus to the swing textfield back. You can type @ again.
focus from dj browser to the awt textfield and then to swing textfield. You can type @.
Clues:
Problem occurs when focused from djbrowser (html input) to swing textfield.
On the case for example when you can not type @ into the swing textfield, If you perform alt+tab and maximize the application problem cleared, you may type @ aganin. Of if you show a dummy JOptionPane message, again the problem disappears. Or jump to an awt textfield and returning back to swing solves it.
The fault is not on dj, it is purely a swt problem. If you remove dj browser and a textfield of swt and focus to that, and then focus to swing textfield, you can not type @ as the same scenario above.
Problem is focus issue, probably started with java 1.7, when we have double blinks on focused swingtextfield and browser. (Focus seems on both components)
Any idea to solve the issue? Or any opened swt ticket to vote?
Last edit: benchpresser 2017-12-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I remember long time ago having issues with certain characters in a web page and for reasons I forgot we solve them adding this header in the HTML: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
Hope this helps,
-Christopher
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the reply. I solved by using a temporarily awt text field, when focus set from dj browser to an swing textfield, this temp awt object gets the focus first and redirects to swing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To generate the issue (latest dj + swt4.3 + java 1.8 current + IE 11.0)
Clues:
Problem occurs when focused from djbrowser (html input) to swing textfield.
On the case for example when you can not type @ into the swing textfield, If you perform alt+tab and maximize the application problem cleared, you may type @ aganin. Of if you show a dummy JOptionPane message, again the problem disappears. Or jump to an awt textfield and returning back to swing solves it.
The fault is not on dj, it is purely a swt problem. If you remove dj browser and a textfield of swt and focus to that, and then focus to swing textfield, you can not type @ as the same scenario above.
Problem is focus issue, probably started with java 1.7, when we have double blinks on focused swingtextfield and browser. (Focus seems on both components)
Any idea to solve the issue? Or any opened swt ticket to vote?
Last edit: benchpresser 2017-12-12
Hi,
Focus, again... the usual culprit. I don't have solutions, mostly workarounds with trade-offs...
Maybe related bugs (with much to read in some comments):
https://bugs.eclipse.org/bugs/show_bug.cgi?id=84532
https://bugs.eclipse.org/bugs/show_bug.cgi?id=353683
https://bugs.eclipse.org/bugs/show_bug.cgi?id=372595
I remember long time ago having issues with certain characters in a web page and for reasons I forgot we solve them adding this header in the HTML:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
Hope this helps,
-Christopher
Thanks for the reply. I solved by using a temporarily awt text field, when focus set from dj browser to an swing textfield, this temp awt object gets the focus first and redirects to swing.