From a88e5b90f6cd55dd39e6a35fc3778d884341bae9 Mon Sep 17 00:00:00 2001 From: Frank Yan Date: Fri, 5 Nov 2010 12:56:03 -0700 Subject: [PATCH] Bug 607518 - After performed Paste & Go and Paste & Search , Ctrl+Z makes blank, Ctrl+Z is necessary twice to undo it. r+a=gavin --HG-- extra : rebase_source : d22c594d6cec8cfbdadb68b799d5e228aa138f8e --- browser/base/content/urlbarBindings.xml | 2 +- browser/components/search/content/search.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml index 48c0d1ea61e..e71c0bd5026 100644 --- a/browser/base/content/urlbarBindings.xml +++ b/browser/base/content/urlbarBindings.xml @@ -161,7 +161,7 @@ pasteAndGo.setAttribute("label", label); pasteAndGo.setAttribute("anonid", "paste-and-go"); pasteAndGo.setAttribute("oncommand", - "gURLBar.value = ''; goDoCommand('cmd_paste'); gURLBar.handleCommand();"); + "gURLBar.select(); goDoCommand('cmd_paste'); gURLBar.handleCommand();"); cxmenu.insertBefore(pasteAndGo, insertLocation.nextSibling); } ]]> diff --git a/browser/components/search/content/search.xml b/browser/components/search/content/search.xml index 3b6ced43022..cfe35fa6e17 100644 --- a/browser/components/search/content/search.xml +++ b/browser/components/search/content/search.xml @@ -605,7 +605,7 @@ element.setAttribute("label", label); element.setAttribute("anonid", "paste-and-search"); element.setAttribute("oncommand", - "BrowserSearch.searchBar.value = ''; goDoCommand('cmd_paste'); BrowserSearch.searchBar.handleSearchCommand();"); + "BrowserSearch.searchBar.select(); goDoCommand('cmd_paste'); BrowserSearch.searchBar.handleSearchCommand();"); cxmenu.insertBefore(element, insertLocation.nextSibling); pasteAndSearch = element; }