In Safari 17.6, typing before CodeMirror block replacement widgets becomes noticeably slow when the widgets contain native focusable elements such as .
Minimal reproduction: create 2–3 Decoration.replace({block: true, widget}) decorations. If each widget contains a static header and a <pre>, editing remains smooth. Adding two <button> elements to each widget causes noticeable input lag when pressing Enter near the start of the document. Removing the buttons immediately resolves it. The same demo remains smooth in Chrome.
This reproduces with both CodeMirror drawSelection() and the native Safari selection, and without ResizeObserver, estimatedHeight, or manual requestMeasure() calls. It appears to be a Safari/WebKit interaction between contenteditable, block widgets, and focusable descendants.