apimall / chromiumembedded

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

Linux: 2171: cefclient: Focus-related events are not correct #1493

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have simple page, which fired events onfocus, onblur and onkeyup:
<textarea id="area" rows="10" cols="100">
</textarea>
<script>
    document.getElementById('area').addEventListener("keyup", function onKeyUp(evt) {
        console.log('on keyup!')
    }, false);
    window.addEventListener("focus", function onFocus(evt) {
        console.log('on focus!')
    }, false);
    window.addEventListener("blur", function onBlur(evt) {
        console.log('on blur!')
    }, false);
</script>

2. Open it in TestApp (example on JsFiddle: http://jsfiddle.net/uxc1hfb0/show/ )
3. Write something in text area - everything is fine, we see keyup events. 
First atachment
4. Switch to console (or any another window) and back - no keyup messages in 
output. Second atachment

What is the expected output? What do you see instead?
I expected the keyup event is always fired.

What version of the product are you using? On what operating system?

CEF 3.2171.1972
Tested on Ubuntu 14.10 + Unity and Archlinux + XMonad. 

Please provide any additional information below.

Same strange with onblur event - when i leave TestApp main window "onblur" 
event does not always fired.
I guess that this is due to communication GdkWindow and internal X11 CEF 
window, because the same events _always_ fired when i use CefSimple app instead 
CefClient, who doesn't use GTK at all.

Original issue reported on code.google.com by krasichk...@gmail.com on 17 Jan 2015 at 12:22

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by magreenb...@gmail.com on 11 Feb 2015 at 7:03

GoogleCodeExporter commented 9 years ago
I'm also seeing the same exact issue on Windows. 
The trick to reproduce the bug is to try switch to the CEF window by clicking 
into an input field. 
Note, using the keyboard to switch windows doesn't reproduce the bug. 

You must use the mouse and click into an input field when switching back into 
CEF.

Clicking *twice* brings the focus back correctly.

Original comment by mma...@gmail.com on 19 Feb 2015 at 7:20

GoogleCodeExporter commented 9 years ago
CEF is transitioning from Google Code to Bitbucket project hosting. If you 
would like to continue receiving notifications on this issue please add 
yourself as a Watcher at the new location: 
https://bitbucket.org/chromiumembedded/cef/issue/1493

Original comment by magreenb...@gmail.com on 14 Mar 2015 at 3:36