fastdom: prevent some errors
This commit is contained in:
parent
f4a28dbec7
commit
fd5421b929
2 changed files with 2 additions and 2 deletions
|
|
@ -67,7 +67,7 @@ class ColorPicker extends UiWidget {
|
|||
|
||||
close() {
|
||||
|
||||
if (this.parentNode.contains(this.container)) {
|
||||
if (this.parentNode && this.parentNode.contains(this.container)) {
|
||||
this.parentNode.removeChild(this.container)
|
||||
}
|
||||
this.setName()
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class UiDragResize extends UiWidget {
|
|||
keyboardJS.bind('alt', (e)=>{
|
||||
if (e.target.tagName !== 'TEXTAREA') this.handles[0].classList.add('full')
|
||||
}, (e)=>{
|
||||
if (e.target.tagName !== 'TEXTAREA') this.handles[0].classList.remove('full')
|
||||
if (e.target && e.target.tagName !== 'TEXTAREA') this.handles[0].classList.remove('full')
|
||||
})
|
||||
keyboardJS.bind('alt+c', (e)=>{
|
||||
if (e.target.tagName === 'TEXTAREA') return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue