Fix search input focus issue

This commit is contained in:
Woody 2023-11-26 16:52:43 +01:00
parent cb293fcdb3
commit 443c9fba03
No known key found for this signature in database
GPG Key ID: 9872D7F5072789B2
3 changed files with 10 additions and 3 deletions

View File

@ -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 {

View File

@ -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);">&#xe38f;</i>
<i class="icons search-icon" style="cursor:pointer;">&#xe0a1;</i>
<div id="filters" class="filter fade">

View File

@ -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;