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:
anthonyd%netscape.com 2006-09-14 05:53:22 +00:00
Родитель ec18daba43
Коммит feb03ed925
2 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

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