| Index: chrome/browser/resources/local_ntp/local_ntp.js
|
| diff --git a/chrome/browser/resources/local_ntp/local_ntp.js b/chrome/browser/resources/local_ntp/local_ntp.js
|
| index e63fbaaa469ede776b7b04ca9e0702289152b249..c32257c69c78a8d7914d826544156c708640964f 100644
|
| --- a/chrome/browser/resources/local_ntp/local_ntp.js
|
| +++ b/chrome/browser/resources/local_ntp/local_ntp.js
|
| @@ -55,6 +55,7 @@ var IDS = {
|
| ATTRIBUTION_TEXT: 'attribution-text',
|
| CUSTOM_THEME_STYLE: 'ct-style',
|
| FAKEBOX: 'fakebox',
|
| + FAKEBOX_INPUT: 'fakebox-input',
|
| LOGO: 'logo',
|
| NOTIFICATION: 'mv-notice',
|
| NOTIFICATION_CLOSE_BUTTON: 'mv-notice-x',
|
| @@ -954,7 +955,8 @@ function init() {
|
| fakebox = document.createElement('div');
|
| fakebox.id = IDS.FAKEBOX;
|
| fakebox.innerHTML =
|
| - '<input autocomplete="off" tabindex="-1" aria-hidden="true">' +
|
| + '<input id="' + IDS.FAKEBOX_INPUT +
|
| + '" autocomplete="off" tabindex="-1" aria-hidden="true">' +
|
| '<div id=cursor></div>';
|
|
|
| ntpContents.insertBefore(fakebox, ntpContents.firstChild);
|
| @@ -1018,7 +1020,7 @@ function init() {
|
|
|
| if (fakebox) {
|
| // Listener for updating the key capture state.
|
| - document.body.onclick = function(event) {
|
| + document.body.onmousedown = function(event) {
|
| if (isFakeboxClick(event))
|
| searchboxApiHandle.startCapturingKeyStrokes();
|
| else if (isFakeboxFocused())
|
| @@ -1027,6 +1029,13 @@ function init() {
|
| searchboxApiHandle.onkeycapturechange = function() {
|
| setFakeboxFocus(searchboxApiHandle.isKeyCaptureEnabled);
|
| };
|
| + var inputbox = $(IDS.FAKEBOX_INPUT);
|
| + if (inputbox) {
|
| + inputbox.onpaste = function(event) {
|
| + event.preventDefault();
|
| + searchboxApiHandle.paste();
|
| + };
|
| + }
|
| }
|
|
|
| if (searchboxApiHandle.rtl) {
|
|
|