I created a simple chrome app which has only one text div element by id "sample". I'm testing on chromebook. The problem is this:
- I typed few keys in text input.
- I pressed the full screen button in Chromebook.
The focus on the text input element is lost.
This is the function i'm using to create the chrome app window
chrome.app.runtime.onLaunched.addListener(function() {
chrome.app.window.create('index.html',
{'bounds': {'width': 500, 'height': 309}});
});
I wrote a small javascript code to handle the full screen issue. But this is not working:
chrome.app.window.current().onFullscreened.addListener(function(){
var textbox = document.getElementById("sample");
textbox.focus();
});
Please help.