plate icon indicating copy to clipboard operation
plate copied to clipboard

When an incorrect URL is typed into the Plate.js floating link toolbar, it triggers form submission if Plate is nested within a form.

Open fufuShih opened this issue 1 year ago • 0 comments

Description

When form is the parent component of Plate.js, entering an incorrect URL in the floating link toolbar is expected to maintain focus on the input field. However, it instead triggers the form submission.

Steps to Reproduce

  1. Click Link and goto floating link toolbar image

  2. Type wrong url and click "Enter" image

  3. It will trigger the form image

Sandbox

Code sandbox

Expected Behavior

The expected behavior is that entering a URL into the floating link feature of the Plate.js editor does not trigger form submission. And focus on the input

Environment

  • slate:
  • slate-react:
  • browser: chrome

Bounty

Click here to add a bounty via Algora.

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

fufuShih avatar Mar 28 '24 12:03 fufuShih