You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ArrowUp, ArrowDown and Enter are not working when input component is not on focus - e.g for use without input or when absolutely positioned over textarea
#267
Open
1 of 3 tasks
zifnab87 opened this issue
Jan 5, 2020
· 1 comment
Thanks for your great work! It really has made my life easier by replacing a lot of boilerplate code of mine.
What is the current behavior?
Right now the user has to be on focus of input to use the arrow keys.
What is the expected behavior? / What is the motivation / use case for changing the behavior?
I am trying to make a suggestion like the @-mechanism (see attached screenshot) found e.g in Github and Facebook. This requires no input (which I can hide and I can position the suggestion-menu to be absolute). I have to open and close the list using $ref.[].showList() - $ref.[].hideList() but since I have added the controls configuration per the documentation it needs to work when the list is shown not just when the input is on focus. it would have been helpful if the list was shown by default if the list is not empty - so I don't need to call anything when the input is not on focus.
I was able to make it work and I have an example in case you want to put it somewhere in your documentation:
The text was updated successfully, but these errors were encountered:
zifnab87
changed the title
ArrowUp, ArrowDown and Enter are not working when input component is not on focus
ArrowUp, ArrowDown and Enter are not working when input component is not on focus - e.g for use without input and absolutely positioned
Jan 5, 2020
zifnab87
changed the title
ArrowUp, ArrowDown and Enter are not working when input component is not on focus - e.g for use without input and absolutely positioned
ArrowUp, ArrowDown and Enter are not working when input component is not on focus - e.g for use without input or when absolutely positioned over textarea
Jan 5, 2020
IMHO, vue-simple-suggest should not handle global events and should only handle events which go directly to the component/input, because it adds complexity. However global event handler solves this use case (which I consed edge case) it makes troubles in another potential edge cases, e.g. multiple open autocomplete components.
I'm submitting a ...
Thanks for your great work! It really has made my life easier by replacing a lot of boilerplate code of mine.
What is the current behavior?
Right now the user has to be on focus of input to use the arrow keys.
What is the expected behavior? / What is the motivation / use case for changing the behavior?
I am trying to make a suggestion like the @-mechanism (see attached screenshot) found e.g in Github and Facebook. This requires no input (which I can hide and I can position the suggestion-menu to be absolute). I have to open and close the list using $ref.[].showList() - $ref.[].hideList() but since I have added the controls configuration per the documentation it needs to work when the list is shown not just when the input is on focus. it would have been helpful if the list was shown by default if the list is not empty - so I don't need to call anything when the input is not on focus.
I was able to make it work and I have an example in case you want to put it somewhere in your documentation:
https://gist.github.com/zifnab87/3747a229f5157850475c0bb408e62af2
The text was updated successfully, but these errors were encountered: