New issue
Advanced search Search tips

Issue 881640 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Sep 26
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

navigator.clipboard.readText does not give an error if called in invalid context

Project Member Reported by jamiewa...@chromium.org, Sep 7

Issue description

Chrome Version: 68.0.3440.106
OS: Linux (tested)

What steps will reproduce the problem?
(1) Navigate to https://example.com
(2) Open the JS console.
(3) Run navigator.clipboard.readText()

What is the expected result?
API fails with an error message.

What happens instead?
API fails with "undefined".
 
Components: -Blink>Editing>Paste Blink>DataTransfer
Status: WontFix (was: Untriaged)
Mark WontFix since we get "reject" Promise on Chrome M69.

# Step
1. Visit http://example.com
2. Open Console, e.g. Ctrl+Shift+I
3. Type  navigator.clipboard.readText()

# Log of console
/favicon.ico:1 Failed to load resource: the server responded with a status of 404 ()
navigator.clipboard.readText()

PromiseĀ {<pending>}__proto__: Promise[[PromiseStatus]]: "rejected"[[PromiseValue]]: undefined
example.com/:1 Uncaught (in promise) undefined

Sign in to add a comment