mirror of https://github.com/gorhill/uBlock.git
Use `type="search"` for search input fields
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/768 So that the input fields can gain extra built-in browser widgets useful in search fields.
This commit is contained in:
parent
3dc0686ba5
commit
da253bf80c
|
@ -122,21 +122,16 @@ body[dir="rtl"] #pageSelector {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
#netInspector #filterInput {
|
#netInspector #filterInput {
|
||||||
|
border: 1px solid gray;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
}
|
}
|
||||||
#netInspector #filterInput > input {
|
#netInspector #filterInput > input {
|
||||||
min-width: 18em;
|
border: 0;
|
||||||
|
min-width: 16em;
|
||||||
}
|
}
|
||||||
#netInspector #filterExprButton {
|
#netInspector #filterExprButton {
|
||||||
position: absolute;
|
|
||||||
transform: scaleY(-1);
|
transform: scaleY(-1);
|
||||||
}
|
}
|
||||||
body[dir="ltr"] #netInspector #filterExprButton {
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
body[dir="rtl"] #netInspector #filterExprButton {
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
#netInspector #filterExprButton:hover {
|
#netInspector #filterExprButton:hover {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<button type="button" class="custom iconifiable" id="importButton"><span class="fa"></span><span data-i18n="rulesImport"></span></button>
|
<button type="button" class="custom iconifiable" id="importButton"><span class="fa"></span><span data-i18n="rulesImport"></span></button>
|
||||||
<button type="button" class="custom iconifiable important disabled" id="editSaveButton"><span class="fa"></span><span data-i18n="rulesEditSave"></span></button>
|
<button type="button" class="custom iconifiable important disabled" id="editSaveButton"><span class="fa"></span><span data-i18n="rulesEditSave"></span></button>
|
||||||
</div>
|
</div>
|
||||||
<div id="ruleFilter"><span class="fa"></span> <input type="text" size="20"></div>
|
<div id="ruleFilter"><span class="fa"></span> <input type="search" size="20"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -96,11 +96,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function queryTextFromSearchWidget(cm) {
|
function queryTextFromSearchWidget(cm) {
|
||||||
return getSearchState(cm).widget.querySelector('input[type="text"]').value;
|
return getSearchState(cm).widget.querySelector('input[type="search"]').value;
|
||||||
}
|
}
|
||||||
|
|
||||||
function queryTextToSearchWidget(cm, q) {
|
function queryTextToSearchWidget(cm, q) {
|
||||||
var input = getSearchState(cm).widget.querySelector('input[type="text"]');
|
var input = getSearchState(cm).widget.querySelector('input[type="search"]');
|
||||||
if ( typeof q === 'string' && q !== input.value ) {
|
if ( typeof q === 'string' && q !== input.value ) {
|
||||||
input.value = q;
|
input.value = q;
|
||||||
}
|
}
|
||||||
|
@ -310,7 +310,7 @@
|
||||||
'<div class="cm-search-widget">' +
|
'<div class="cm-search-widget">' +
|
||||||
'<span class="fa-icon fa-icon-ro">search</span> ' +
|
'<span class="fa-icon fa-icon-ro">search</span> ' +
|
||||||
'<span class="cm-search-widget-input">' +
|
'<span class="cm-search-widget-input">' +
|
||||||
'<input type="text">' +
|
'<input type="search">' +
|
||||||
'<span class="cm-search-widget-count">' +
|
'<span class="cm-search-widget-count">' +
|
||||||
'<span><!-- future use --></span><span>0</span>' +
|
'<span><!-- future use --></span><span>0</span>' +
|
||||||
'</span>' +
|
'</span>' +
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
<span id="filterExprGroup">
|
<span id="filterExprGroup">
|
||||||
<span id="filterButton" class="button fa-icon" data-i18n-title="loggerRowFiltererButtonTip">filter</span>
|
<span id="filterButton" class="button fa-icon" data-i18n-title="loggerRowFiltererButtonTip">filter</span>
|
||||||
<span id="filterInput">
|
<span id="filterInput">
|
||||||
<input type="text" placeholder="logFilterPrompt">
|
<input type="search" placeholder="logFilterPrompt">
|
||||||
<span id="filterExprButton" class="button fa-icon expanded" data-i18n-title="loggerRowFiltererBuiltinTip">angle-up</span>
|
<span id="filterExprButton" class="button fa-icon expanded" data-i18n-title="loggerRowFiltererBuiltinTip">angle-up</span>
|
||||||
<div id="filterExprPicker">
|
<div id="filterExprPicker">
|
||||||
<div><span data-filtex="!" data-i18n="loggerRowFiltererBuiltinNot"></span><span data-filtex="\t--\t|\t<<\t|\t##" data-i18n="loggerRowFiltererBuiltinBlocked"></span><span data-filtex="\t\+\+\t|\t\*\*\t|\t#@#" data-i18n="loggerRowFiltererBuiltinAllowed"></span></div>
|
<div><span data-filtex="!" data-i18n="loggerRowFiltererBuiltinNot"></span><span data-filtex="\t--\t|\t<<\t|\t##" data-i18n="loggerRowFiltererBuiltinBlocked"></span><span data-filtex="\t\+\+\t|\t\*\*\t|\t#@#" data-i18n="loggerRowFiltererBuiltinAllowed"></span></div>
|
||||||
|
|
Loading…
Reference in New Issue