built-in client: add nofocus client option to prevent the client window from taking focus unless a text input or a dropdown is clicked
This commit is contained in:
parent
13c7f80052
commit
7528f702aa
3 changed files with 12 additions and 0 deletions
|
|
@ -33,6 +33,10 @@ function mouseToFastClick(event) {
|
|||
|
||||
DOM.dispatchEvent(e.target, name, e)
|
||||
|
||||
if (ENV.nofocus && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
|
||||
console.debug('ELECTRON.BLUR()')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function touchToFastClick(event) {
|
||||
|
|
@ -59,6 +63,10 @@ function touchToFastClick(event) {
|
|||
|
||||
}, 600)
|
||||
|
||||
if (ENV.nofocus && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
|
||||
console.debug('ELECTRON.BLUR()')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!iOS) document.addEventListener('pointerdown', mouseToFastClick, true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue