| Summary: | navigator.clipboard.read is not working context menu | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Vishnu <visu.rohini> |
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | bfulgham, gsnedders, rniwa, webkit-bug-importer, wenson_hsieh, wilander |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 14 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
|
Description
Vishnu
2021-07-25 22:19:35 PDT
Are we not treating right-click as a user gesture? 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. (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? (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() ``` |