plate icon indicating copy to clipboard operation
plate copied to clipboard

Link floating toolbar doesn't open first time in Safari (Mac)

Open literalpie opened this issue 9 months ago • 1 comments

Description

In Safari, the floating toolbar doesn't open in a visible location the first time it is opened. Clicking the link button a second time opens it in the correct location.

Inspecting the DOM reveals that it is "visible", but the position is a very large negative number.

style="position: absolute; top: -10497px; left: -10147px; z-index: 1;"

Steps to Reproduce

  1. Go to the demo site in Safari on a Mac: https://platejs.org (I also see this issue in my own private project)
  2. highlight some text that doesn't currently have a link
  3. Click the link button in the toolbar to add a link to the currently selected text (the floating toolbar will not open as expected)
  4. Click the link button a second time (The floating toolbar will open this time)

Sandbox

https://platejs.org

Expected Behavior

The toolbar should open the first time

Environment

  • slate: 0.94.1
  • slate-react: 0.98.4
  • browser: Safari 16.6
  • Plate: 24.0.2

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

literalpie avatar Sep 27 '23 14:09 literalpie