зеркало из https://github.com/mozilla/pjs.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:
Родитель
ffabca3053
Коммит
2827ee9b73
|
@ -1808,3 +1808,15 @@ function getNewThemes()
|
||||||
{
|
{
|
||||||
window._content.location.href = brandBundle.GetStringFromName("getNewThemesURL");
|
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);"/>
|
<image id="page-proxy-button" ondraggesture="nsDragAndDrop.startDrag(event, proxyIconDNDObserver);"/>
|
||||||
<textfield autocomplete="true" timeout="300" class="plain"
|
<textfield autocomplete="true" timeout="300" class="plain"
|
||||||
searchSessionType="urlbar" id="urlbar" tooltip="aTooltip" tooltiptext="&locationBar.tooltip;"
|
searchSessionType="urlbar" id="urlbar" tooltip="aTooltip" tooltiptext="&locationBar.tooltip;"
|
||||||
|
onblur="URLBarBlurHandler(event);"
|
||||||
|
onfocus="URLBarFocusHandler(event);"
|
||||||
onkeypress="if( event.keyCode == 13 ) { addToUrlbarHistory(); BrowserLoadURL(); }" flex="1"/>
|
onkeypress="if( event.keyCode == 13 ) { addToUrlbarHistory(); BrowserLoadURL(); }" flex="1"/>
|
||||||
</box>
|
</box>
|
||||||
<menubutton class="menubutton-icon" id="ubhist">
|
<menubutton class="menubutton-icon" id="ubhist">
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<binding id="autocomplete" extends="chrome://global/content/xulBindings.xml#textfield">
|
<binding id="autocomplete" extends="chrome://global/content/xulBindings.xml#textfield">
|
||||||
<content excludes="template,observes,menupopup">
|
<content excludes="template,observes,menupopup">
|
||||||
<xul:box class="textfield-internal-box" flex="1">
|
<xul:box class="textfield-internal-box" flex="1">
|
||||||
<html:input class="textfield-input" flex="1" inherits="value,type,maxlength,disabled,size,readonly"/>
|
<html:input class="textfield-input" flex="1" inherits="onfocus,onblur,value,type,maxlength,disabled,size,readonly"/>
|
||||||
<xul:popupset ignorekeys="true"
|
<xul:popupset ignorekeys="true"
|
||||||
oncommand="var me = this.parentNode.parentNode; me.privatefunc.onMenuCommand(me, this);"
|
oncommand="var me = this.parentNode.parentNode; me.privatefunc.onMenuCommand(me, this);"
|
||||||
>
|
>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче