tribute icon indicating copy to clipboard operation
tribute copied to clipboard

Removing items with backspace is not working when added by showMenuForCollection menu

Open Roywcm opened this issue 2 years ago • 3 comments

How can we reproduce this bug?

  1. Open the menu with tribute.showMenuForCollection(input);
  2. Select an item
  3. Try to remove the item with backspace

Also reproducible in the demo https://zurb.github.io/tribute/example/:

  1. Add an item with the @mention link
  2. Try to remove the item with backspace

What did you expect to happen? Removing the item

What happened instead? Nothing

Roywcm avatar Sep 01 '22 10:09 Roywcm

Hello, I am also facing the same issue. When contenteditable is set to false in selectTemplate method, it is not clearing the mention link with backspace.

jyotisingh-tudip avatar Sep 08 '22 07:09 jyotisingh-tudip

add this code in tribute.js it should work { key: "input", value: function input(instance, event) { instance.inputEvent = true; instance.keydown.call(this, instance, event); } }

manikantayarramsetti1 avatar Oct 28 '22 14:10 manikantayarramsetti1

You can add &nbsp in front of innerHTML after showMenuForCollection;

ccj-007 avatar Jan 17 '24 08:01 ccj-007