diff options
author | Florrie <towerofnix@gmail.com> | 2018-01-19 09:29:57 -0400 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-01-19 09:29:57 -0400 |
commit | 6ee1936266dda3bd22e4412a7b51cdc6e3c396d5 (patch) | |
tree | 8b07b4ed2d6ebab22814c792c4e1c6e29249498f /ui/Root.js | |
parent | 159c042e3cddf1f585812840b4189295f2e5ebba (diff) |
Pass false to firstInput to not select the form if it wasn't already selected
Diffstat (limited to 'ui/Root.js')
-rw-r--r-- | ui/Root.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/Root.js b/ui/Root.js index 22c2c97..d306a41 100644 --- a/ui/Root.js +++ b/ui/Root.js @@ -90,4 +90,11 @@ module.exports = class Root extends DisplayElement { this.cursorMoved() } + + isChildOrSelfSelected(el) { + if (!this.selected) return false + if (this.selected === el) return true + if (this.selected.directAncestors.includes(el)) return true + return false + } } |