Bug 275608 - Clicking Edit > Paste in the in-page menu on Google Docs results in a failed MESSAGE_CHECK
Summary: Clicking Edit > Paste in the in-page menu on Google Docs results in a failed ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: Safari 17
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-06-18 07:15 PDT by ikopylov
Modified: 2024-06-21 08:16 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ikopylov 2024-06-18 07:15:54 PDT
Seeing "This webpage reloaded because a problem occured" on Google Docs on Safari 17.5, when using the menu the Edit->Paste.

Also reproduces on this fiddle: https://jsfiddle.net/fawq7y6h/

Issue seems to be calling execCommand('paste') on an iframe's contentDocument.
Comment 1 Radar WebKit Bug Importer 2024-06-18 07:29:04 PDT
<rdar://problem/130078654>
Comment 2 Wenson Hsieh 2024-06-18 07:34:30 PDT
I can reproduce this — failed message check in WebPageProxy:

```
void WebPageProxy::requestDOMPasteAccess(DOMPasteAccessCategory pasteAccessCategory, FrameIdentifier frameID, const IntRect& elementRect, const String& originIdentifier, CompletionHandler<void(DOMPasteAccessResponse)>&& completionHandler)
{
    MESSAGE_CHECK_COMPLETION(m_legacyMainFrameProcess, !originIdentifier.isEmpty(), completionHandler(DOMPasteAccessResponse::DeniedForGesture));
```

Seems like something we need to investigate. Thanks for the report!
Comment 3 Wenson Hsieh 2024-06-18 13:13:08 PDT
Pull request: https://github.com/WebKit/WebKit/pull/29947
Comment 4 EWS 2024-06-18 18:23:00 PDT
Committed 280149@main (50abb5331762): <https://commits.webkit.org/280149@main>

Reviewed commits have been landed. Closing PR #29947 and removing active labels.
Comment 5 ikopylov 2024-06-21 08:16:26 PDT
Thanks for the fix! Which version of Safari will this land in?