NOtherDev / whatwebcando

An overview of the device integration HTML5 APIs
https://whatwebcando.today/
MIT License
836 stars 61 forks source link

Clipboard cut demo works but copy fails and reports success #45

Closed 1j01 closed 6 years ago

1j01 commented 6 years ago

On https://whatwebcando.today/clipboard.html, the "Copy email address programatically" button doesn't work

15:28:34 User performed cut operation. Payload is: .

15:28:34 Cutting text command was successful.

15:28:35 User performed paste operation. Payload is: Hello! Cut me programatically or maybe try pasting here..

15:28:37 User performed copy operation. Payload is: .

15:28:37 Copy email command was successful.

15:28:38 User performed paste operation. Payload is: Hello! Cut me programatically or maybe try pasting here..
1j01 commented 6 years ago

The document selection range setting isn't working (whereas textarea.select() works).

NOtherDev commented 6 years ago

In which browser are you checking? I've verified in Chrome on desktop and on mobile and it works fine. There was an inconsistency when you had something already selected – this should be fixed now.

1j01 commented 6 years ago

Chrome 65.0.3325.88 on Windows 10 It still doesn't work for me, regardless of whether I have something selected (assuming that fix is supposed to be live on the website)

NOtherDev commented 6 years ago

Yeah, definitely, because apparently I badly broke it yesterday :wink: Can you check it once again (making sure you're starting with a clean state, because Service Worker caching and stuff...) Thanks!

1j01 commented 6 years ago

Works now! 👍