diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-06-22 12:14:05 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-06-22 12:14:05 +0200 |
commit | be93f4a38fe421be6efe84c39cc33ae92d61c31a (patch) | |
tree | def822dc0a6573b42f04646d846843c17493ce0c /application | |
parent | cadeea97bbefe42f89d16a4678fdc382c7b74bcd (diff) | |
download | UXP-be93f4a38fe421be6efe84c39cc33ae92d61c31a.tar UXP-be93f4a38fe421be6efe84c39cc33ae92d61c31a.tar.gz UXP-be93f4a38fe421be6efe84c39cc33ae92d61c31a.tar.lz UXP-be93f4a38fe421be6efe84c39cc33ae92d61c31a.tar.xz UXP-be93f4a38fe421be6efe84c39cc33ae92d61c31a.zip |
Prevent the Quickdial page from stealing focus from the address bar.
Diffstat (limited to 'application')
-rw-r--r-- | application/palemoon/base/content/newtab/newTab.css | 9 | ||||
-rw-r--r-- | application/palemoon/base/content/newtab/newTab.xhtml | 3 | ||||
-rw-r--r-- | application/palemoon/base/content/newtab/search.js | 10 |
3 files changed, 4 insertions, 18 deletions
diff --git a/application/palemoon/base/content/newtab/newTab.css b/application/palemoon/base/content/newtab/newTab.css index dad447ef4..a5431cf65 100644 --- a/application/palemoon/base/content/newtab/newTab.css +++ b/application/palemoon/base/content/newtab/newTab.css @@ -267,8 +267,7 @@ input[type=button] { } #searchText[keepfocus], -#searchText:focus, -#searchText[autofocus] { +#searchText:focus { border-color: hsla(216,100%,60%,.6) hsla(216,76%,52%,.6) hsla(214,100%,40%,.6); } @@ -299,14 +298,12 @@ input[type=button] { } #searchText:focus + #searchSubmit, -#searchText + #searchSubmit:hover, -#searchText[autofocus] + #searchSubmit { +#searchText + #searchSubmit:hover { border-color: #5985fc #4573e7 #3264d5; } #searchText:focus + #searchSubmit, -#searchText[keepfocus] + #searchSubmit, -#searchText[autofocus] + #searchSubmit { +#searchText[keepfocus] + #searchSubmit { box-shadow: 0 1px 0 hsla(0,0%,100%,.2) inset, 0 0 0 1px hsla(0,0%,100%,.1) inset, 0 1px 0 hsla(220,54%,20%,.03); diff --git a/application/palemoon/base/content/newtab/newTab.xhtml b/application/palemoon/base/content/newtab/newTab.xhtml index a435bfa73..eac62c987 100644 --- a/application/palemoon/base/content/newtab/newTab.xhtml +++ b/application/palemoon/base/content/newtab/newTab.xhtml @@ -40,8 +40,7 @@ <div id="searchContainer"> <form name="searchForm" id="searchForm" onsubmit="onSearchSubmit(event)"> <div id="searchLogoContainer"><img id="searchEngineLogo"/></div> - <input type="text" name="q" value="" id="searchText" maxlength="256" - autofocus="autofocus"/> + <input type="text" name="q" value="" id="searchText" maxlength="256"/> <input id="searchSubmit" type="submit" value="&newtab.searchEngineButton.label;"/> </form> </div> diff --git a/application/palemoon/base/content/newtab/search.js b/application/palemoon/base/content/newtab/search.js index cafc772bc..40d3e449c 100644 --- a/application/palemoon/base/content/newtab/search.js +++ b/application/palemoon/base/content/newtab/search.js @@ -116,15 +116,6 @@ function onSearchSubmit(aEvent) { function setupSearchEngine() { - // The "autofocus" attribute doesn't focus the form element - // immediately when the element is first drawn, so the - // attribute is also used for styling when the page first loads. - let searchText = document.getElementById("searchText"); - searchText.addEventListener("blur", function searchText_onBlur() { - searchText.removeEventListener("blur", searchText_onBlur); - searchText.removeAttribute("autofocus"); - }); - let searchEngineName = document.documentElement.getAttribute("searchEngineName"); let searchEngineInfo = SEARCH_ENGINES[searchEngineName]; let logoElt = document.getElementById("searchEngineLogo"); @@ -139,5 +130,4 @@ function setupSearchEngine() { logoElt.parentNode.hidden = true; searchText.placeholder = searchEngineName; } - } |