Bug 1522115 - Prevent the new "about:config" search field from moving slightly when the page is scrolled. r=bgrins

Differential Revision: https://phabricator.services.mozilla.com/D17392

--HG--
extra : rebase_source : 9112bb0d5d5d353e91a8a828e4ff4f03aaaa213f
This commit is contained in:
Paolo Amadini 2019-01-24 18:58:26 +00:00
parent ee415d487e
commit d5f7d8afde
2 changed files with 14 additions and 4 deletions

View File

@ -24,13 +24,20 @@ body.config-warning {
fill: #fcd100;
}
#search {
#search-container {
position: sticky;
top: 0;
margin: 10px;
box-sizing: border-box;
width: calc(100% - 20px);
width: 100%;
background-color: var(--in-content-page-background);
padding: 10px;
padding-bottom: 0;
min-width: 644px;
}
#search {
box-sizing: border-box;
width: 100%;
background-image: url("chrome://global/skin/icons/search-textbox.svg");
background-repeat: no-repeat;
background-position: 9px center;

View File

@ -325,11 +325,14 @@ function loadPrefs() {
[...document.styleSheets].find(s => s.title == "infop").disabled = true;
document.body.textContent = "";
let searchContainer = document.createElement("div");
searchContainer.id = "search-container";
let search = document.createElement("input");
search.type = "text";
search.id = "search";
document.l10n.setAttributes(search, "about-config-search");
document.body.appendChild(search);
searchContainer.appendChild(search);
document.body.appendChild(searchContainer);
search.focus();
let prefs = document.createElement("table");