tribute
tribute copied to clipboard
Detach removes menu even if attached elements remain.
How can we reproduce this bug?
- https://jsfiddle.net/xpvt214o/669183/
- Enter
@
in Div1 to bring up Tribute menu. Verify functionality - Enter
@
in Div2 to bring up Tribute menu. Verify functionality - Click "Detach from Div1"
- Verify Tribute is detached from Div1
- Tribute no longer pops up menu in Div2, however if you use the arrow keys or enter, you can cause completion.
What did you expect to happen?
Menu should still function in Div2
What happened instead?
Menu does not function in either element, although selection and completion still function in Div2
Here is one possible solution to this problem. I don't know if it is the "right" way to do it: https://github.com/Sebjugate/tribute/commit/786620a848a86b0cbff3fa9f41b8e6bf4c03097b
This seems like a good approach as I would like to avoid creating a separate menu element for each instance of Tribute.
Hi, I'm also facing this issue.
It turns out the events also need to be re-bound to the menu element, I added that in my possible solution.
While my suggested solution works, it doesn't feel like the best solution. I have submitted another idea which requires more code changes but reduces code duplication. This is a mockup only I have not tested it
I am still facing this issue...what to do ?