mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 16:46:26 +00:00
bug fix for 22163
selection of url bar on focus r=akkana
This commit is contained in:
parent
4221dc20fd
commit
fbbd682a7c
@ -1220,16 +1220,26 @@ function BrowserChangeTextSize(newSize)
|
||||
{
|
||||
var nodeName = node.localName;
|
||||
if (nodeName == "")
|
||||
{
|
||||
dump('****** returning null 1\n');
|
||||
return null;
|
||||
}
|
||||
nodeName = nodeName.toLowerCase();
|
||||
if (nodeName == "" || nodeName == "body"
|
||||
|| nodeName == "html" || nodeName == "#document")
|
||||
{
|
||||
dump('****** returning null 2\n');
|
||||
return null;
|
||||
}
|
||||
var href = node.href;
|
||||
if (nodeName == "a" && href != "")
|
||||
{
|
||||
dump('****** returning :'+node+'\n');
|
||||
return node;
|
||||
}
|
||||
node = node.parentNode;
|
||||
}
|
||||
dump('****** returning null 3\n');
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -1809,14 +1819,21 @@ function getNewThemes()
|
||||
window._content.location.href = brandBundle.GetStringFromName("getNewThemesURL");
|
||||
}
|
||||
|
||||
function URLBarFocusHandler(aEvent)
|
||||
|
||||
function URLBarLeftClickHandler(aEvent)
|
||||
{
|
||||
var URLBar = aEvent.target;
|
||||
URLBar.setSelectionRange(0, URLBar.value.length);
|
||||
if (pref.GetBoolPref("browser.urlbar.clickSelectsAll"))
|
||||
{
|
||||
var URLBar = aEvent.target;
|
||||
URLBar.setSelectionRange(0, URLBar.value.length);
|
||||
}
|
||||
}
|
||||
|
||||
function URLBarBlurHandler(aEvent)
|
||||
{
|
||||
var URLBar = aEvent.target;
|
||||
URLBar.setSelectionRange(0, 0);
|
||||
}
|
||||
if (pref.GetBoolPref("browser.urlbar.clickSelectsAll"))
|
||||
{
|
||||
var URLBar = aEvent.target;
|
||||
URLBar.setSelectionRange(0, 0);
|
||||
}
|
||||
}
|
@ -289,7 +289,9 @@ 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;"
|
||||
onkeypress="if( event.keyCode == 13 ) { addToUrlbarHistory(); BrowserLoadURL(); }" flex="1"/>
|
||||
onclick="if (event.button==1) URLBarLeftClickHandler(event);"
|
||||
onblur="URLBarBlurHandler(event);"
|
||||
onkeypress="if( event.keyCode == 13 ) { addToUrlbarHistory(); BrowserLoadURL(); }" flex="1"/>
|
||||
</box>
|
||||
<menubutton class="menubutton-icon" id="ubhist">
|
||||
<menupopup id="ubhist-popup" popupalign="topright" popupanchor="bottomright"
|
||||
|
Loading…
Reference in New Issue
Block a user