[Webkit-unassigned] [Bug 228274] navigator.clipboard.read is not working context menu

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 26 14:59:47 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=228274

--- Comment #4 from Wenson Hsieh <wenson_hsieh at apple.com> ---
(In reply to Sam Sneddon [:gsnedders] from comment #3)
> (In reply to Wenson Hsieh from comment #2)
> > I'm guessing what's happening here is that right click presents a context
> > menu on macOS, which causes the context menu we present for granting
> > programmatic paste access (i.e. a menu with a single Paste menu item in it)
> > to dismiss immediately. This results in the promise being rejected right
> > away :/
> > 
> > We probably need both to coexist somehow.
> 
> Ah, so this is specific to pasting, and won't affect other places where we
> require a trusted user gesture?

Correct (we create the user gesture token underneath this stack trace when right clicking):

```
1   0x114a5be6f WebCore::UserGestureToken::UserGestureToken(WebCore::ProcessingUserGestureState, WebCore::UserGestureType, WebCore::Document*)
2   0x114a5c449 WebCore::UserGestureIndicator::UserGestureIndicator(std::__1::optional<WebCore::ProcessingUserGestureState>, WebCore::Document*, WebCore::UserGestureType, WebCore::UserGestureIndicator::ProcessInteractionStyle)
3   0x114f6f4a9 WebCore::EventHandler::handleMousePressEvent(WebCore::PlatformMouseEvent const&)
4   0x1154e6ee6 WebCore::UserInputBridge::handleMousePressEvent(WebCore::PlatformMouseEvent const&, WebCore::InputSource)
5   0x10d51657a WebKit::WebPage::mouseEvent(WebKit::WebMouseEvent const&, std::__1::optional<WebKit::SandboxExtension::HandleArray>&&)
6   0x10d532e78 WebKit::WebPage::didReceiveWebPageMessage(IPC::Connection&, IPC::Decoder&)
7   0x10ce43cce IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&)
8   0x10d357dec WebKit::WebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
9   0x10ce26204 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)
10  0x10ce26445 IPC::Connection::dispatchOneIncomingMessage()
```

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210726/e81c4db2/attachment-0001.htm>


More information about the webkit-unassigned mailing list