7167-testToMaster_2414 #266

Merged
alexm merged 230 commits from 7167-testToMaster_2414 into master 2024-04-04 05:35:08 +00:00
1 changed files with 5 additions and 1 deletions
Showing only changes of commit 8a82b7ab38 - Show all commits

View File

@ -1,5 +1,9 @@
import { getCurrentInstance } from 'vue';
const filterAvailableInput = element => element.classList.contains('q-field__native') && !element.disabled
const filterAvailableText = element => element.__vueParentComponent.type.name === 'QInput' && element.__vueParentComponent?.attrs?.class !== 'vn-input-date';
export default {
mounted: function () {
const vm = getCurrentInstance();
@ -7,7 +11,7 @@ export default {
if (!['searchbarForm','filterPanelForm'].includes(this.$el?.id)) {
// AUTOFOCUS
const elementsArray = Array.from(this.$el.elements);
const firstInputElement = elementsArray.find(element => element.classList.contains('q-field__native'));
const firstInputElement = elementsArray.filter(filterAvailableInput).find(filterAvailableText);
if (firstInputElement) {
firstInputElement.focus();