mirror of
https://github.com/wled/WLED.git
synced 2025-07-22 18:26:32 +00:00
Fix search input focus issue
This commit is contained in:
parent
cb293fcdb3
commit
443c9fba03
@ -469,6 +469,7 @@ button {
|
|||||||
height: 54px;
|
height: 54px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* New tooltip */
|
/* New tooltip */
|
||||||
@ -1240,6 +1241,7 @@ TD .checkmark, TD .radiomark {
|
|||||||
.filter .fchkl {
|
.filter .fchkl {
|
||||||
margin: 0 4px;
|
margin: 0 4px;
|
||||||
min-width: 20px;
|
min-width: 20px;
|
||||||
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lbl-l {
|
.lbl-l {
|
||||||
|
@ -197,8 +197,8 @@
|
|||||||
<div id="Effects" class="tabcontent">
|
<div id="Effects" class="tabcontent">
|
||||||
<div id="fx">
|
<div id="fx">
|
||||||
<p class="labels hd" id="modeLabel">Effect mode</p>
|
<p class="labels hd" id="modeLabel">Effect mode</p>
|
||||||
<div class="staytop fnd" id="fxFind">
|
<div class="staytop fnd" id="fxFind" onmousedown="preventBlur(event);">
|
||||||
<input type="text" placeholder="Search" oninput="search(this,'fxlist')" onfocus="filterFocus(event);search(this,'fxlist');" onblur="filterFocus(event);" />
|
<input type="text" placeholder="Search" oninput="search(this,'fxlist')" onfocus="filterFocus(event);search(this,'fxlist');" onblur="filterFocus(event);">
|
||||||
<i class="icons clear-icon" onclick="clean(this);"></i>
|
<i class="icons clear-icon" onclick="clean(this);"></i>
|
||||||
<i class="icons search-icon" style="cursor:pointer;"></i>
|
<i class="icons search-icon" style="cursor:pointer;"></i>
|
||||||
<div id="filters" class="filter fade">
|
<div id="filters" class="filter fade">
|
||||||
|
@ -2776,7 +2776,7 @@ function filterFocus(e)
|
|||||||
}, 252);
|
}, 252);
|
||||||
if (e.type === "blur") {
|
if (e.type === "blur") {
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
if (e.target === document.activeElement) return;
|
if (e.target === document.activeElement && document.hasFocus()) return;
|
||||||
f.classList.add('fade');
|
f.classList.add('fade');
|
||||||
},255); // wait with hiding
|
},255); // wait with hiding
|
||||||
}
|
}
|
||||||
@ -2798,6 +2798,11 @@ function filterFx()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function preventBlur(e) {
|
||||||
|
if (e.target === gId("fxFind").children[0] || e.target === gId("filters")) return;
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
// make sure "dur" and "transition" are arrays with at least the length of "ps"
|
// make sure "dur" and "transition" are arrays with at least the length of "ps"
|
||||||
function formatArr(pl) {
|
function formatArr(pl) {
|
||||||
var l = pl.ps.length;
|
var l = pl.ps.length;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user