зеркало из https://github.com/mozilla/gecko-dev.git
fix for bug #22163
making url bar behaviour the same as 4.x and IE xul text fields, autocomplete fields now respond to onblur and onfocus events r=hyatt,mjudge
This commit is contained in:
Родитель
ec18daba43
Коммит
feb03ed925
|
@ -1808,3 +1808,15 @@ function getNewThemes()
|
|||
{
|
||||
window._content.location.href = brandBundle.GetStringFromName("getNewThemesURL");
|
||||
}
|
||||
|
||||
function URLBarFocusHandler(aEvent)
|
||||
{
|
||||
var URLBar = aEvent.target;
|
||||
URLBar.setSelectionRange(0, URLBar.value.length);
|
||||
}
|
||||
|
||||
function URLBarBlurHandler(aEvent)
|
||||
{
|
||||
var URLBar = aEvent.target;
|
||||
URLBar.setSelectionRange(0, 0);
|
||||
}
|
||||
|
|
|
@ -289,6 +289,8 @@ Contributor(s): ______________________________________. -->
|
|||
<image id="page-proxy-button" ondraggesture="nsDragAndDrop.startDrag(event, proxyIconDNDObserver);"/>
|
||||
<textfield autocomplete="true" timeout="300" class="plain"
|
||||
searchSessionType="urlbar" id="urlbar" tooltip="aTooltip" tooltiptext="&locationBar.tooltip;"
|
||||
onblur="URLBarBlurHandler(event);"
|
||||
onfocus="URLBarFocusHandler(event);"
|
||||
onkeypress="if( event.keyCode == 13 ) { addToUrlbarHistory(); BrowserLoadURL(); }" flex="1"/>
|
||||
</box>
|
||||
<menubutton class="menubutton-icon" id="ubhist">
|
||||
|
|
Загрузка…
Ссылка в новой задаче