editor: bypass kb shortcuts when help modal is opened (to allow text copy)
This commit is contained in:
parent
c5aa1d3e3e
commit
574dbe7f9e
2 changed files with 10 additions and 2 deletions
|
|
@ -169,7 +169,7 @@ class Editor {
|
|||
|
||||
handleKeyboard(combo, e){
|
||||
|
||||
if (e.target && (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA' || e.target.tagName === 'SELECT')) return
|
||||
if (this.inspector.helpModalOpened || e.target && (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA' || e.target.tagName === 'SELECT')) return
|
||||
|
||||
e.preventDefault()
|
||||
|
||||
|
|
|
|||
|
|
@ -85,6 +85,8 @@ class UiInspector extends UiWidget {
|
|||
this.lock = false
|
||||
this.clearTimeout = null
|
||||
|
||||
this.helpModalOpened = false
|
||||
|
||||
}
|
||||
|
||||
clear() {
|
||||
|
|
@ -269,7 +271,7 @@ class UiInspector extends UiWidget {
|
|||
computedValue = JSON.stringify(computedValue, null, ' ')
|
||||
}
|
||||
|
||||
new UiModal({closable: true, title: html`<span class="editor-help-title">${name}</span>`, html: true, content: html`
|
||||
var modal = new UiModal({closable: true, title: html`<span class="editor-help-title">${name}</span>`, html: true, content: html`
|
||||
<div class="inspector-help">
|
||||
|
||||
<div class="header">
|
||||
|
|
@ -291,6 +293,12 @@ class UiInspector extends UiWidget {
|
|||
</div>
|
||||
`})
|
||||
|
||||
|
||||
this.helpModalOpened = true
|
||||
modal.on('close', ()=>{
|
||||
this.helpModalOpened = false
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue