From b7f3d6a6beec5ea5acaa5ccba507e4d653aa0a6a Mon Sep 17 00:00:00 2001 From: Mohamad Salman <139472418+MohamadSalman11@users.noreply.github.com> Date: Sat, 8 Feb 2025 18:37:52 +0100 Subject: [PATCH 1/2] Rename `fixtureId` to `FIXTURE_ID` in `js/tests/helpers` for consistency (#41150) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Julien Déramond --- js/tests/helpers/fixture.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/tests/helpers/fixture.js b/js/tests/helpers/fixture.js index 5ad14e1db9dd..86e93116a094 100644 --- a/js/tests/helpers/fixture.js +++ b/js/tests/helpers/fixture.js @@ -1,11 +1,11 @@ -const fixtureId = 'fixture' +const FIXTURE_ID = 'fixture' export const getFixture = () => { - let fixtureElement = document.getElementById(fixtureId) + let fixtureElement = document.getElementById(FIXTURE_ID) if (!fixtureElement) { fixtureElement = document.createElement('div') - fixtureElement.setAttribute('id', fixtureId) + fixtureElement.setAttribute('id', FIXTURE_ID) fixtureElement.style.position = 'absolute' fixtureElement.style.top = '-10000px' fixtureElement.style.left = '-10000px' From c5be828d99a43e871572e205d41badeac1d1f70f Mon Sep 17 00:00:00 2001 From: Mohamad Salman <139472418+MohamadSalman11@users.noreply.github.com> Date: Sun, 9 Feb 2025 10:50:20 +0100 Subject: [PATCH 2/2] Docs: fix clipboard icon visibility issue after multiple clicks (#40917) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Julien Déramond --- site/assets/js/partials/code-examples.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/site/assets/js/partials/code-examples.js b/site/assets/js/partials/code-examples.js index 87791a759f89..1e86df9f99ac 100644 --- a/site/assets/js/partials/code-examples.js +++ b/site/assets/js/partials/code-examples.js @@ -63,6 +63,11 @@ export default () => { const namespace = 'http://www.w3.org/1999/xlink' const originalXhref = iconFirstChild.getAttributeNS(namespace, 'href') const originalTitle = event.trigger.title + const isCheckIconVisible = originalXhref === '#check2' + + if (isCheckIconVisible) { + return + } tooltipBtn.setContent({ '.tooltip-inner': 'Copied!' }) event.trigger.addEventListener('hidden.bs.tooltip', () => {