Describe in detail what your merge request does and why.
This PR fixes the clipboard component so that it functions in browsers other than chrome when value is hidden.
Previously the copy to clipboard component used javascript to verify that the javascript is first allowed to write to the clipboard before attempting to write to the clipboard. This permission verification only works on Chrome, no other browsers respond to this. But since this is a user driven action we do not need to verify permission as it is automatically granted. The fallback behavior was to select the input and then initiate copy, but since the input stores *** when hidden we cannot use that as it only works after the user clicks the eye icon to show it on screen. Since all the other browsers support Clipboard.writeText() we can just call the method directly and remove the fallback behavior after removing browser permission verification.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other pull requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Update asdf ruby plugin
asdf plugin update ruby
Ensure asdf dependencies updated
asdf install
Install gems
bundle
Migrate database
bin/rails db:migrate
Launch server
bin/dev
Launch firefox and generate a new personal access token, and click copy to clipboard. Paste into a blank document and ensure content is not ********************.
PR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
What does this PR do and why?
Describe in detail what your merge request does and why.
This PR fixes the clipboard component so that it functions in browsers other than chrome when value is hidden.
Previously the copy to clipboard component used javascript to verify that the javascript is first allowed to write to the clipboard before attempting to write to the clipboard. This permission verification only works on Chrome, no other browsers respond to this. But since this is a user driven action we do not need to verify permission as it is automatically granted. The fallback behavior was to select the input and then initiate copy, but since the input stores *** when hidden we cannot use that as it only works after the user clicks the eye icon to show it on screen. Since all the other browsers support
Clipboard.writeText()
we can just call the method directly and remove the fallback behavior after removing browser permission verification.Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other pull requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
********************
.PR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.