Skip to content

Commit

Permalink
Attempt for allowWithoutGesture -- accessing user clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
arielclj committed Jun 16, 2020
1 parent 942f988 commit 9d56b1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion web/src/ImageClassification/ImageClassification.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ class ImageClassification extends React.Component {
handleClick = (e) => {
e.preventDefault();
navigator.permissions.query({
name: 'clipboard-read'
name: 'clipboard-read',
allowWithoutGesture: false
}).then(result => {
console.log(result);
if (result.state === 'prompt' || result.state === 'granted' ) {
Expand Down
3 changes: 2 additions & 1 deletion web/src/QuestionAnswering/QuestionAnswering.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ class QuestionAnswering extends React.Component {
handleClick = (e) => {
e.preventDefault();
navigator.permissions.query({
name: 'clipboard-read'
name: 'clipboard-read',
allowWithoutGesture: false
}).then(result => {
console.log(result);
if (result.state === 'prompt' || result.state === 'granted' ) {
Expand Down

0 comments on commit 9d56b1e

Please sign in to comment.