From 9a79744a38cde38e2b278c58f6fc223376b6d687 Mon Sep 17 00:00:00 2001 From: Christian Heel <66922325+heelc29@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:47:39 +0100 Subject: [PATCH 1/3] test --- tests/System/support/index.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/System/support/index.js b/tests/System/support/index.js index 68b3967f8d96f..56187a334d676 100644 --- a/tests/System/support/index.js +++ b/tests/System/support/index.js @@ -3,11 +3,6 @@ import('joomla-cypress'); before(() => { cy.task('startMailServer'); - Cypress.on('uncaught:exception', (err, runnable) => { - console.log(`err :${err}`); - console.log(`runnable :${runnable}`); - return false; - }); }); afterEach(() => { From fde4ef689ce0315de34e39d9df7e8da70b2ea4d5 Mon Sep 17 00:00:00 2001 From: Christian Heel <66922325+heelc29@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:48:14 +0100 Subject: [PATCH 2/3] Revert "check if toggleButton exists (#44555)" This reverts commit d87bb981ee34ca25a66ecb5754cb2d0dd0c8341a. --- .../system/js/fields/passwordview.es6.js | 75 +++++++++---------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/build/media_source/system/js/fields/passwordview.es6.js b/build/media_source/system/js/fields/passwordview.es6.js index d4c1bcb62ceb5..484ecc41941d6 100644 --- a/build/media_source/system/js/fields/passwordview.es6.js +++ b/build/media_source/system/js/fields/passwordview.es6.js @@ -11,45 +11,44 @@ .forEach((input) => { const toggleButton = input.parentNode.querySelector('.input-password-toggle'); - if (toggleButton) { - const hasClickListener = toggleButton.getAttribute('clickListener') === 'true'; - - if (!hasClickListener) { - toggleButton.setAttribute('clickListener', 'true'); - toggleButton.addEventListener('click', () => { - const icon = toggleButton.firstElementChild; - const srText = toggleButton.lastElementChild; - - if (input.type === 'password') { - // Update the icon class - icon.classList.remove('icon-eye'); - icon.classList.add('icon-eye-slash'); - - // Update the input type - input.type = 'text'; - - // Focus the input field - input.focus(); - - // Update the text for screenreaders - srText.innerText = Joomla.Text._('JHIDEPASSWORD'); - } else if (input.type === 'text') { - // Update the icon class - icon.classList.add('icon-eye'); - icon.classList.remove('icon-eye-slash'); - - // Update the input type - input.type = 'password'; - - // Focus the input field - input.focus(); - - // Update the text for screenreaders - srText.innerText = Joomla.Text._('JSHOWPASSWORD'); - } - }); - } + const hasClickListener = toggleButton.getAttribute('clickListener') === 'true'; + + if (toggleButton && !hasClickListener) { + toggleButton.setAttribute('clickListener', 'true'); + toggleButton.addEventListener('click', () => { + const icon = toggleButton.firstElementChild; + const srText = toggleButton.lastElementChild; + + if (input.type === 'password') { + // Update the icon class + icon.classList.remove('icon-eye'); + icon.classList.add('icon-eye-slash'); + + // Update the input type + input.type = 'text'; + + // Focus the input field + input.focus(); + + // Update the text for screenreaders + srText.innerText = Joomla.Text._('JHIDEPASSWORD'); + } else if (input.type === 'text') { + // Update the icon class + icon.classList.add('icon-eye'); + icon.classList.remove('icon-eye-slash'); + + // Update the input type + input.type = 'password'; + + // Focus the input field + input.focus(); + + // Update the text for screenreaders + srText.innerText = Joomla.Text._('JSHOWPASSWORD'); + } + }); } + const modifyButton = input.parentNode.querySelector('.input-password-modify'); if (modifyButton) { From f400ff1fdd188eca982549a3d8018b1befc23a1a Mon Sep 17 00:00:00 2001 From: Christian Heel <66922325+heelc29@users.noreply.github.com> Date: Fri, 10 Jan 2025 19:41:31 +0100 Subject: [PATCH 3/3] Reapply "check if toggleButton exists (#44555)" This reverts commit fde4ef689ce0315de34e39d9df7e8da70b2ea4d5. --- .../system/js/fields/passwordview.es6.js | 75 ++++++++++--------- 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/build/media_source/system/js/fields/passwordview.es6.js b/build/media_source/system/js/fields/passwordview.es6.js index 484ecc41941d6..d4c1bcb62ceb5 100644 --- a/build/media_source/system/js/fields/passwordview.es6.js +++ b/build/media_source/system/js/fields/passwordview.es6.js @@ -11,44 +11,45 @@ .forEach((input) => { const toggleButton = input.parentNode.querySelector('.input-password-toggle'); - const hasClickListener = toggleButton.getAttribute('clickListener') === 'true'; - - if (toggleButton && !hasClickListener) { - toggleButton.setAttribute('clickListener', 'true'); - toggleButton.addEventListener('click', () => { - const icon = toggleButton.firstElementChild; - const srText = toggleButton.lastElementChild; - - if (input.type === 'password') { - // Update the icon class - icon.classList.remove('icon-eye'); - icon.classList.add('icon-eye-slash'); - - // Update the input type - input.type = 'text'; - - // Focus the input field - input.focus(); - - // Update the text for screenreaders - srText.innerText = Joomla.Text._('JHIDEPASSWORD'); - } else if (input.type === 'text') { - // Update the icon class - icon.classList.add('icon-eye'); - icon.classList.remove('icon-eye-slash'); - - // Update the input type - input.type = 'password'; - - // Focus the input field - input.focus(); - - // Update the text for screenreaders - srText.innerText = Joomla.Text._('JSHOWPASSWORD'); - } - }); + if (toggleButton) { + const hasClickListener = toggleButton.getAttribute('clickListener') === 'true'; + + if (!hasClickListener) { + toggleButton.setAttribute('clickListener', 'true'); + toggleButton.addEventListener('click', () => { + const icon = toggleButton.firstElementChild; + const srText = toggleButton.lastElementChild; + + if (input.type === 'password') { + // Update the icon class + icon.classList.remove('icon-eye'); + icon.classList.add('icon-eye-slash'); + + // Update the input type + input.type = 'text'; + + // Focus the input field + input.focus(); + + // Update the text for screenreaders + srText.innerText = Joomla.Text._('JHIDEPASSWORD'); + } else if (input.type === 'text') { + // Update the icon class + icon.classList.add('icon-eye'); + icon.classList.remove('icon-eye-slash'); + + // Update the input type + input.type = 'password'; + + // Focus the input field + input.focus(); + + // Update the text for screenreaders + srText.innerText = Joomla.Text._('JSHOWPASSWORD'); + } + }); + } } - const modifyButton = input.parentNode.querySelector('.input-password-modify'); if (modifyButton) {