console error fixed

This commit is contained in:
Burak Civan 2022-11-29 10:07:39 +03:00
parent 6d43a4fa96
commit 41fbca6725
2 changed files with 11 additions and 9 deletions

View File

@ -246,10 +246,11 @@ function runTooltip(tooltipToggleEl) {
function show() { function show() {
// Make the tooltip visible // Make the tooltip visible
tooltipEl.classList.remove("opacity-0"); if (tooltipEl.classList.contains("opacity-0", "invisible")) {
tooltipEl.classList.add("opacity-100"); tooltipEl.classList.remove("opacity-0", "invisible");
tooltipEl.classList.remove("invisible"); } else {
tooltipEl.classList.add("visible"); tooltipEl.classList.add("opacity-100", "visible");
}
// Enable the event listeners // Enable the event listeners
popperInstance.setOptions((options) => ({ popperInstance.setOptions((options) => ({
@ -267,11 +268,12 @@ function runTooltip(tooltipToggleEl) {
} }
function hide() { function hide() {
tooltipEl.classList.remove("opacity-100");
tooltipEl.classList.add("opacity-0");
tooltipEl.classList.remove("visible");
tooltipEl.classList.add("invisible");
// Hide the tooltip // Hide the tooltip
if (tooltipEl.classList.contains("opacity-100", "visible")) {
tooltipEl.classList.remove("opacity-100", "visible");
} else {
tooltipEl.classList.add("opacity-0", "invisible");
}
// Disable the event listeners // Disable the event listeners
popperInstance.setOptions((options) => ({ popperInstance.setOptions((options) => ({

View File

@ -17,7 +17,7 @@
accept-charset="{{ $acceptCharset }}" accept-charset="{{ $acceptCharset }}"
@endif @endif
@submit.prevent="{{ $submit }}" @submit.prevent="{{ $submit }}"
@keydown="form.errors.clear($event.target.name)" @keydown="form.errors ? form.errors.clear($event.target.name): null"
{{ $attributes }} {{ $attributes }}
> >
@csrf @csrf