diff --git a/Resources/Private/Components/Reply/index.js b/Resources/Private/Components/Reply/index.js index 8d280c2..b6923ee 100644 --- a/Resources/Private/Components/Reply/index.js +++ b/Resources/Private/Components/Reply/index.js @@ -4,7 +4,7 @@ const ReplyButton = () => { const buttonClass = '.comment-reply-button'; return ( - document.querySelectorAll(buttonClass).forEach(buttonNode => { + [].slice.call(document.querySelectorAll(buttonClass)).forEach(buttonNode => { buttonNode.addEventListener('click', (event) => { let button = event.target; document.getElementById(formFieldId).value = button.getAttribute('data-identifier'); diff --git a/Resources/Public/Main.js b/Resources/Public/Main.js index 0b14715..59f4431 100644 --- a/Resources/Public/Main.js +++ b/Resources/Public/Main.js @@ -1 +1 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(1),u=r(o),c=n(2),a=r(c),i=n(3);r(i);(0,u.default)(),window.commentsReCaptchaSubmit=a.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return document.querySelectorAll(".comment-reply-button").forEach(function(e){e.addEventListener("click",function(e){var t=e.target;document.getElementById("reference").value=t.getAttribute("data-identifier");var n=document.getElementById("comment-form"),r=n.cloneNode(!0);n.parentNode.removeChild(n),t.parentNode.appendChild(r),document.querySelectorAll(".comment-replies-action").forEach(function(e){e.classList.remove("has-form")}),t.parentNode.classList.add("has-form")})})};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){document.getElementById("reCaptchaToken").value=e,document.getElementById("comment-form").submit()};t.default=r},function(e,t){}]); \ No newline at end of file +!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(1),u=r(o),c=n(2),a=r(c),l=n(3);r(l);(0,u.default)(),window.commentsReCaptchaSubmit=a.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return[].slice.call(document.querySelectorAll(".comment-reply-button")).forEach(function(e){e.addEventListener("click",function(e){var t=e.target;document.getElementById("reference").value=t.getAttribute("data-identifier");var n=document.getElementById("comment-form"),r=n.cloneNode(!0);n.parentNode.removeChild(n),t.parentNode.appendChild(r),document.querySelectorAll(".comment-replies-action").forEach(function(e){e.classList.remove("has-form")}),t.parentNode.classList.add("has-form")})})};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){document.getElementById("reCaptchaToken").value=e,document.getElementById("comment-form").submit()};t.default=r},function(e,t){}]); \ No newline at end of file