tribute icon indicating copy to clipboard operation
tribute copied to clipboard

Detach removes menu even if attached elements remain.

Open Sebjugate opened this issue 6 years ago • 5 comments

How can we reproduce this bug?

  1. https://jsfiddle.net/xpvt214o/669183/
  2. Enter @ in Div1 to bring up Tribute menu. Verify functionality
  3. Enter @ in Div2 to bring up Tribute menu. Verify functionality
  4. Click "Detach from Div1"
  5. Verify Tribute is detached from Div1
  6. 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

Sebjugate avatar Aug 23 '18 18:08 Sebjugate

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

Sebjugate avatar Aug 23 '18 18:08 Sebjugate

This seems like a good approach as I would like to avoid creating a separate menu element for each instance of Tribute.

mrsweaters avatar Aug 23 '18 22:08 mrsweaters

Hi, I'm also facing this issue.

shvvffle avatar Aug 24 '18 16:08 shvvffle

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

Sebjugate avatar Aug 24 '18 23:08 Sebjugate

I am still facing this issue...what to do ?

rishabh010189 avatar Mar 18 '21 07:03 rishabh010189