Bug 1182760 - urlbar binding shouldn't have two focus handlers. r=ttaubert

This commit is contained in:
Dão Gottwald 2015-07-11 20:28:14 +02:00
parent e042893ae8
commit 8b4eab8adb

View File

@ -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[