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