Merge pull request #2813 from brkcvn/master

Javascript console error fixed
This commit is contained in:
Burak Civan 2022-12-12 16:37:37 +03:00 committed by GitHub
commit e968a62c80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 31 deletions

View File

@ -190,6 +190,7 @@ function runDropdown(dropdownToggleEl) {
], ],
}); // toggle when click on the button }); // toggle when click on the button
if (dropdownMenuEl !== null) {
dropdownMenuEl.classList.toggle("hidden"); dropdownMenuEl.classList.toggle("hidden");
dropdownMenuEl.classList.toggle("block"); dropdownMenuEl.classList.toggle("block");
@ -219,10 +220,12 @@ function runDropdown(dropdownToggleEl) {
dropdownMenuEl.classList.remove("block"); dropdownMenuEl.classList.remove("block");
return; return;
} }
debugger;
dropdownMenuEl.classList.add("block"); dropdownMenuEl.classList.add("block");
dropdownMenuEl.classList.remove("hidden"); dropdownMenuEl.classList.remove("hidden");
} }
} }
}
// Toggle dropdown elements using [data-dropdown-toggle] // Toggle dropdown elements using [data-dropdown-toggle]
// Tooltip elements using [data-tooltip-target], [data-tooltip-placement] // Tooltip elements using [data-tooltip-target], [data-tooltip-placement]

View File

@ -114,7 +114,7 @@ const app = new Vue({
onRefFocus(ref) { onRefFocus(ref) {
let index = this.form.items.length - 1; let index = this.form.items.length - 1;
if (this.$refs['items-' + index + '-' + ref] != undefined) { if (typeof (this.$refs['items-' + index + '-' + ref]) !== 'undefined') {
let first_ref = this.$refs['items-' + index + '-' + ref]; let first_ref = this.$refs['items-' + index + '-' + ref];
first_ref != undefined ? first_ref[0].focus() : this.$refs[Object.keys(this.$refs)[0]][0].focus(); first_ref != undefined ? first_ref[0].focus() : this.$refs[Object.keys(this.$refs)[0]][0].focus();
} }