mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 252441 - Dropping text containing spaces will now perform a search on the given sentence. r=gavin.sharp
This commit is contained in:
parent
c0b4a0ab95
commit
382a30b4a7
@ -4030,8 +4030,7 @@
|
||||
url = browserDragAndDrop.drop(event, { }, true);
|
||||
} catch (ex) {}
|
||||
|
||||
// valid urls don't contain spaces ' '; if we have a space it isn't a valid url.
|
||||
if (!url || url.contains(" "))
|
||||
if (!url)
|
||||
return;
|
||||
|
||||
let bgLoad = Services.prefs.getBoolPref("browser.tabs.loadInBackground");
|
||||
@ -4043,12 +4042,12 @@
|
||||
if (!tab || dropEffect == "copy") {
|
||||
// We're adding a new tab.
|
||||
let newIndex = this._getDropIndex(event);
|
||||
let newTab = this.tabbrowser.loadOneTab(getShortcutOrURI(url), {inBackground: bgLoad});
|
||||
let newTab = this.tabbrowser.loadOneTab(url, {inBackground: bgLoad, allowThirdPartyFixup: true});
|
||||
this.tabbrowser.moveTabTo(newTab, newIndex);
|
||||
} else {
|
||||
// Load in an existing tab.
|
||||
try {
|
||||
this.tabbrowser.getBrowserForTab(tab).loadURI(getShortcutOrURI(url));
|
||||
this.tabbrowser.getBrowserForTab(tab).loadURIWithFlags(url, Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP);
|
||||
if (!bgLoad)
|
||||
this.selectedItem = tab;
|
||||
} catch(ex) {
|
||||
|
@ -64,7 +64,7 @@ function test() {
|
||||
drop("mochi.test/first", true);
|
||||
drop("javascript:'bad'");
|
||||
drop("jAvascript:'bad'");
|
||||
drop("space bad");
|
||||
drop("search this", true);
|
||||
drop("mochi.test/second", true);
|
||||
drop("data:text/html,bad");
|
||||
drop("mochi.test/third", true);
|
||||
|
Loading…
Reference in New Issue
Block a user