зеркало из https://github.com/mozilla/gecko-dev.git
Bug 894811 - First character gets dropped when typing into urlbar after opening a new tab.r=mbrubeck
This commit is contained in:
Родитель
feda467b9e
Коммит
f332128f59
|
@ -281,20 +281,22 @@
|
|||
<parameter name="aShouldDismiss"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
if (this.isEditing)
|
||||
if (this.isEditing) {
|
||||
return;
|
||||
}
|
||||
|
||||
Elements.urlbarState.setAttribute("mode", "edit");
|
||||
this._lastKnownGoodURL = this.value;
|
||||
|
||||
if (!this.focused)
|
||||
if (!this.focused) {
|
||||
this.focus();
|
||||
}
|
||||
|
||||
this._clearFormatting();
|
||||
this.select();
|
||||
|
||||
if (aShouldDismiss)
|
||||
if (aShouldDismiss) {
|
||||
ContextUI.dismissTabs();
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
@ -313,8 +315,9 @@
|
|||
if (this.focused)
|
||||
this.blur();
|
||||
|
||||
if (aShouldRevert)
|
||||
if (aShouldRevert) {
|
||||
this.value = this._lastKnownGoodURL;
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
@ -445,6 +448,7 @@
|
|||
<handler event="click" phase="capturing">
|
||||
<![CDATA[
|
||||
this.beginEditing(true);
|
||||
this.select();
|
||||
]]>
|
||||
</handler>
|
||||
|
||||
|
|
|
@ -1075,6 +1075,7 @@ var BrowserUI = {
|
|||
case "cmd_newTab":
|
||||
this.newTab(null, null, true);
|
||||
this._edit.beginEditing(false);
|
||||
this._edit.select();
|
||||
break;
|
||||
case "cmd_closeTab":
|
||||
this.closeTab();
|
||||
|
|
Загрузка…
Ссылка в новой задаче