If you use the `navigator.clipboard.read` methods, safari throws up a "Paste" context menu for permission approval, but if you're on an external monitor that context menu doesn't show up so the api is unusable for people with external monitors. Sometimes it only works on external monitors, and sometimes it only works on built-in display. I'm not sure what causes the difference. https://codepen.io/msfeldstein/pen/qBVrOev
<rdar://problem/88943577>
I suspect this is due to the way in which we compute the confinement rect when positioning the DOM paste context menu: ``` - (NSRect)confinementRectForMenu:(NSMenu *)menu onScreen:(NSScreen *)screen { auto confinementRect = WebCore::enclosingIntRect(NSRect { NSEvent.mouseLocation, menu.size }); confinementRect.move(0, -confinementRect.height()); return confinementRect; } ``` ...will look into this soon.
Created attachment 453514 [details] Fixes the bug
Created attachment 453521 [details] + Test coverage
Comment on attachment 453521 [details] + Test coverage Thanks for the review!
Committed r290712 (247959@main): <https://commits.webkit.org/247959@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 453521 [details].