mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-03-15 07:42:41 -04:00
Merge pull request #3665 from alphagov/fix-bug-with-copy-to-clipboard
Fix bug with copy to clipboard
This commit is contained in:
@@ -29,9 +29,10 @@
|
||||
|
||||
this.getRangeFromElement = function (keyElement) {
|
||||
const range = document.createRange();
|
||||
const childNodes = Array.prototype.slice.call(keyElement.childNodes);
|
||||
let prefixIndex = -1;
|
||||
|
||||
Array.from(keyElement.childNodes).forEach((el, idx) => {
|
||||
childNodes.forEach((el, idx) => {
|
||||
if ((el.nodeType === 1) && el.classList.contains('govuk-visually-hidden')) {
|
||||
prefixIndex = idx;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
position: absolute;
|
||||
bottom: 2px;
|
||||
left: 0px;
|
||||
|
||||
&:active {
|
||||
top: auto;
|
||||
|
||||
Reference in New Issue
Block a user