Closed tungleduyxyz closed 1 year ago
Here is the following ticket: https://github.com/killbill/killbill-admin-ui/issues/348
Follow the Bootstrap document here: https://getbootstrap.com/docs/3.4/javascript/#popovers-usage You can see the option sanitize, the default value is true, which means it will sanitize the content option. The content option included an input tag, which is not in this whiteList https://getbootstrap.com/docs/3.4/javascript/#js-sanitizer So the popover will remove the input tag, which is used for the Copy to clipboard trick: https://github.com/killbill/killbill-admin-ui/blob/985e5c94c893abe780cc9361e9dbe9f568afd3b1/app/assets/javascripts/kaui/kaui.js#L386 That’s why we are unable to copy the text.
We use the execCommand function to execute the copy to the clipboard, which is deprecated: https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand
Here is the following ticket: https://github.com/killbill/killbill-admin-ui/issues/348
Follow the Bootstrap document here: https://getbootstrap.com/docs/3.4/javascript/#popovers-usage You can see the option sanitize, the default value is true, which means it will sanitize the content option. The content option included an input tag, which is not in this whiteList https://getbootstrap.com/docs/3.4/javascript/#js-sanitizer So the popover will remove the input tag, which is used for the Copy to clipboard trick: https://github.com/killbill/killbill-admin-ui/blob/985e5c94c893abe780cc9361e9dbe9f568afd3b1/app/assets/javascripts/kaui/kaui.js#L386 That’s why we are unable to copy the text.
We use the execCommand function to execute the copy to the clipboard, which is deprecated: https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand