scripting: setFocus(id) not affecting textarea widgets
This commit is contained in:
parent
f206369ef0
commit
d00b22d35e
2 changed files with 9 additions and 2 deletions
|
|
@ -43,7 +43,7 @@ class TextArea extends Widget {
|
|||
if (this.getProp('interaction')) {
|
||||
|
||||
this.input.setAttribute('tabindex', 0)
|
||||
this.on('focus', this.focus.bind(this), {element: this.input})
|
||||
this.on('focus', this.onFocus.bind(this), {element: this.input})
|
||||
this.on('blur', (e)=>{
|
||||
this.blur(true)
|
||||
}, {element: this.input})
|
||||
|
|
@ -65,13 +65,19 @@ class TextArea extends Widget {
|
|||
|
||||
}
|
||||
|
||||
focus() {
|
||||
onFocus() {
|
||||
|
||||
if (this.focused) return
|
||||
this.focused = true
|
||||
|
||||
}
|
||||
|
||||
focus() {
|
||||
|
||||
this.input.focus()
|
||||
|
||||
}
|
||||
|
||||
blur(change=true) {
|
||||
|
||||
if (!this.focused) return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue