diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index 50caf406e..7784ca600 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -246,11 +246,10 @@ function runTooltip(tooltipToggleEl) { function show() { // Make the tooltip visible - if (tooltipEl.classList.contains("opacity-0", "invisible")) { - tooltipEl.classList.remove("opacity-0", "invisible"); - } else { - tooltipEl.classList.add("opacity-100", "visible"); - } + tooltipEl.classList.remove("opacity-0"); + tooltipEl.classList.add("opacity-100"); + tooltipEl.classList.remove("invisible"); + tooltipEl.classList.add("visible"); // Enable the event listeners popperInstance.setOptions((options) => ({ @@ -268,11 +267,10 @@ function runTooltip(tooltipToggleEl) { } function hide() { - if (tooltipEl.classList.contains("opacity-100", "visible")) { - tooltipEl.classList.remove("opacity-100", "visible"); - } else { - tooltipEl.classList.add("opacity-0", "invisible"); - } + tooltipEl.classList.remove("opacity-100"); + tooltipEl.classList.add("opacity-0"); + tooltipEl.classList.remove("visible"); + tooltipEl.classList.add("invisible"); // Hide the tooltip // Disable the event listeners diff --git a/resources/views/components/form/index.blade.php b/resources/views/components/form/index.blade.php index 4b09f2e66..5dfcbcb73 100644 --- a/resources/views/components/form/index.blade.php +++ b/resources/views/components/form/index.blade.php @@ -17,7 +17,7 @@ accept-charset="{{ $acceptCharset }}" @endif @submit.prevent="{{ $submit }}" - @keydown="form.errors ? form.errors.clear($event.target.name) : null" + @keydown="form.errors.clear($event.target.name)" {{ $attributes }} > @csrf