plate icon indicating copy to clipboard operation
plate copied to clipboard

Mention combobox throws error and fails to open after deleting a mention

Open wfischer42 opened this issue 2 years ago • 0 comments

Description

Certain user interactions involving Mentions and the Mention Combobox lead to a subsequent error when attempting to add a new mention: Uncaught (in promise) Error: Could not get the bounding client rect of the location. Please provide a fallbackRect.

This is being thrown by floating-ui, and seems to originate in Plate from the plate-floating > createVirtualRef function called in the Combobox component.

Steps

https://github.com/udecode/plate/assets/16843426/e98531ca-5807-45ae-80ec-9f4b945e52b9

  1. Add a mention followed by a space.
  2. Use arrow keys to select the mention
  3. Delete the mention
  4. Attempt to add a new mention

Sandbox https://platejs.org/ (this can be reproduced without modification in the Plate Playground in the docs)

Expectation Should see the combobox and be able to add a new mention.

Environment Plate Docs Playground at the time of writing

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

wfischer42 avatar Jul 21 '23 15:07 wfischer42