mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1182760 - urlbar binding shouldn't have two focus handlers. r=ttaubert
This commit is contained in:
parent
e042893ae8
commit
8b4eab8adb
@ -216,17 +216,16 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
if (!this._formattingEnabled || !this.editor)
|
||||
return;
|
||||
|
||||
// Always clear the strike-out selection first.
|
||||
let controller = this.editor.selectionController;
|
||||
let strikeOut = controller.getSelection(controller.SELECTION_URLSTRIKEOUT);
|
||||
strikeOut.removeAllRanges();
|
||||
|
||||
if (this.focused)
|
||||
return;
|
||||
|
||||
let selection = controller.getSelection(controller.SELECTION_URLSECONDARY);
|
||||
selection.removeAllRanges();
|
||||
|
||||
if (this.focused)
|
||||
return;
|
||||
|
||||
let textNode = this.editor.rootElement.firstChild;
|
||||
let value = textNode.textContent;
|
||||
|
||||
@ -286,17 +285,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="_clearFormatting">
|
||||
<body><![CDATA[
|
||||
if (!this._formattingEnabled)
|
||||
return;
|
||||
|
||||
let controller = this.editor.selectionController;
|
||||
let selection = controller.getSelection(controller.SELECTION_URLSECONDARY);
|
||||
selection.removeAllRanges();
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="handleRevert">
|
||||
<body><![CDATA[
|
||||
var isScrolling = this.popupOpen;
|
||||
@ -953,6 +941,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
<handler event="focus"><![CDATA[
|
||||
if (event.originalTarget == this.inputField) {
|
||||
this._hideURLTooltip();
|
||||
this.formatValue();
|
||||
}
|
||||
]]></handler>
|
||||
@ -991,11 +980,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
event.stopPropagation();
|
||||
]]></handler>
|
||||
|
||||
<handler event="focus" phase="capturing"><![CDATA[
|
||||
this._hideURLTooltip();
|
||||
this._clearFormatting();
|
||||
]]></handler>
|
||||
|
||||
<handler event="dragover" phase="capturing" action="this.onDragOver(event, this);"/>
|
||||
<handler event="drop" phase="capturing" action="this.onDrop(event, this);"/>
|
||||
<handler event="select"><![CDATA[
|
||||
|
Loading…
Reference in New Issue
Block a user