Merge pull request #940 from patriceac/patch-47

Select model by clicking on the file icon itself
This commit is contained in:
cmdr2 2023-02-28 11:59:32 +05:30 committed by GitHub
commit aedf7856e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,8 +110,9 @@ class ModelDropdown
processClick(e) {
e.preventDefault()
if (e.srcElement.classList.contains('model-file')) {
this.saveCurrentSelection(e.srcElement, e.srcElement.innerText, e.srcElement.dataset.path)
if (e.srcElement.classList.contains('model-file') || e.srcElement.classList.contains('fa-file')) {
const elem = e.srcElement.classList.contains('model-file') ? e.srcElement : e.srcElement.parentElement
this.saveCurrentSelection(elem, elem.innerText, elem.dataset.path)
this.hideModelList()
this.modelFilter.focus()
this.modelFilter.select()