Permalink
Browse files

Merge pull request #468 from avallee/master

BrowserSample: Ensure the webview is focused.
2 parents 0dde09b + 4c6d724 commit 22897c98e87435f16d57ddbd7301815d7f4d1180 @beaufortfrancois beaufortfrancois committed on GitHub Jan 27, 2017
Showing with 5 additions and 2 deletions.
  1. +4 −1 samples/webview-samples/browser/browser.js
  2. +1 −1 samples/webview-samples/browser/manifest.json
@@ -4,6 +4,7 @@ var isLoading = false;
onload = function() {
var webview = document.querySelector('webview');
doLayout();
+ webview.focus();
var version = navigator.appVersion.substr(navigator.appVersion.lastIndexOf('Chrome/') + 7);
var match = /([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)/.exec(version);
@@ -196,7 +197,9 @@ onload = function() {
function navigateTo(url) {
resetExitedState();
- document.querySelector('webview').src = url;
+ var webview = document.querySelector('webview');
+ webview.focus();
+ webview.src = url;
}
function doLayout() {
@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Browser Sample",
"minimum_chrome_version": "24.0.1307.0",
- "version": "2.3.2",
+ "version": "2.3.3",
"icons": {
"16": "icon_16.png",
"128": "icon_128.png"

0 comments on commit 22897c9

Please sign in to comment.