vue-treeselect
vue-treeselect copied to clipboard
Create `closeOnBlur` option
Currently the menu always closes on blur: https://github.com/riophae/vue-treeselect/blob/d4943eb8287a5253516501f29326074b2038c434/src/components/Input.vue#L99
For mobile this can be a problem: 1. User taps treeselect, 2. keyboard opens, taking up half the display, 3. user scrolls to see bottom of list but the keyboard obscures it so they keep scrolling until the top of the treeselect leaves the viewport, causing a blur.
Idea: Add a closeOnBlur
option, default true
, and the line of code linked above would only execute if this this is true.
@riophae two questions:
-
Would this have any adverse side-effects I'm not aware of? I.e. are there other scenarios that a 'blur' event may occur and we don't want to turn off the closing behavior in those scenarios?
-
If no adverse side-effects, would you approve a pull request with this option? Any changes from my proposal you'd like to see?
Note for future reference, if we go forward with this, it could possibly solve https://github.com/riophae/vue-treeselect/issues/284
Hi! This is a great idea. Working on it.
So no adverse side-effects or problems that could result by letting it remain open on blur?
If not, and if you'd prefer I'd be happy to add this and submit a pull.
I'm not 100% sure about that. After a preliminary test, it seems to be practicable.
Oh, I forgot to say that... PRs are welcome!
has something been done for that ? I'm having that issue on mobile and it's annoying to not be able to close/hide the keyboard.
@mstratman what's scheduling bro