plate icon indicating copy to clipboard operation
plate copied to clipboard

Issue with Mention plugin

Open davevilela opened this issue 3 years ago • 2 comments

Description

Hello, I'm having an issue with the mention plugin. I followed the steps described in the docs, and I got the mention combobox to work. It opens when I type in the trigger, I can cycle through the options with the keyboard, and it creates the mention element correctly.

The problem is whenever I try to type in anything while the combobox is open, it gets closed and the mention input element is switched back to plain text. I already tried disabling other plugins that might be conflicting, and updating both plate and slate dependencies, but nothing seems to solve it.

Steps

start by typing in the trigger for the combobox as such: Screen Shot 2022-05-29 at 17 52 52

then type in any other character Screen Shot 2022-05-29 at 17 52 59

Expectation

I expect the combobox to return suggestions for the content that is being typed in the Mention input element.

Environment

  • slate: "^0.79.0"
  • slate-react: "^0.66.5"
  • browser: firefox v100.0.2

davevilela avatar May 29 '22 21:05 davevilela

I believe the issue is that you need a version of slate-react between 0.74.2 and 0.79.0 inclusive for this to work. See https://github.com/ianstormtaylor/slate/pull/4876, https://github.com/ianstormtaylor/slate/pull/4993 , and https://github.com/ianstormtaylor/slate/pull/5007 for the reason. We need to update Plate to support the change that landed in 0.80.0, something along the lines of https://github.com/ianstormtaylor/slate/pull/4993#issuecomment-1129118864 until we figure out a more permanent solution for slate-react and then plate.

dylans avatar May 30 '22 00:05 dylans

@dylans apparently it's working fine with 0.80.0 ...

davevilela avatar May 31 '22 21:05 davevilela

@dylans thanks for the tip, in my case I needed to bump up both slate and slate-react versions as follows:

  • slate: 0.65.3 => 0.82.1
  • slate-react: 0.65.3 => 0.83.1

pillowinacoma avatar Oct 07 '22 16:10 pillowinacoma