You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "limingzxf (via GitHub)" <gi...@apache.org> on 2023/12/29 20:50:38 UTC
[I] ref.executeScript can't write clipboard [cordova-plugin-inappbrowser]
limingzxf opened a new issue, #1045:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1045
function legacyCopy(value) {
alert(66)
const ta = document.createElement('textarea')
ta.value = value ?? ''
ta.style.position = 'absolute'
ta.style.opacity = '0'
document.body.appendChild(ta)
ta.select()
document.execCommand('copy')
ta.remove()
alert(76)
}
legacyCopy("res")
will alert 66 and 76,but not write to clipboard
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] ref.executeScript can't write clipboard [cordova-plugin-inappbrowser]
Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek commented on issue #1045:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1045#issuecomment-1872335345
This doesn't appear to be a bug with the in-app browser plugin.
Using `executeScript` to trigger paste commands, either via the deprecated `execCommand` or the newer Clipboard API likely won't work because they need to be triggered from a trusted user event. E.g. the code needs to run as part of a user-initiated device on the DOM.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] ref.executeScript can't write clipboard [cordova-plugin-inappbrowser]
Posted by "limingzxf (via GitHub)" <gi...@apache.org>.
limingzxf commented on issue #1045:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1045#issuecomment-1872334227
i try
const { clipboard } = cordova.plugins;
clipboard.copy("res");
still not working
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] ref.executeScript can't write clipboard [cordova-plugin-inappbrowser]
Posted by "limingzxf (via GitHub)" <gi...@apache.org>.
limingzxf commented on issue #1045:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1045#issuecomment-1872332457
async function copyTextToClipboard(textToCopy) {
try {
if (navigator?.clipboard?.writeText) {
await navigator.clipboard.writeText(textToCopy);
}
} catch (err) {
alert(err);
}
}
copyTextToClipboard(res)
will alert "write persimmon denied"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] ref.executeScript can't write clipboard [cordova-plugin-inappbrowser]
Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek closed issue #1045: ref.executeScript can't write clipboard
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1045
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] ref.executeScript can't write clipboard [cordova-plugin-inappbrowser]
Posted by "limingzxf (via GitHub)" <gi...@apache.org>.
limingzxf commented on issue #1045:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1045#issuecomment-1872335233
I want to use webview to inject js, but it seems impossible
it have many bug
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] ref.executeScript can't write clipboard [cordova-plugin-inappbrowser]
Posted by "limingzxf (via GitHub)" <gi...@apache.org>.
limingzxf commented on issue #1045:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1045#issuecomment-1872337424
thanks,
I would use another injection tool, or give up
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org