mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-12-23 23:49:11 +01:00
Set the dropdown width only when the dropdown is opened, to fix a bug where it would get set before the DOM element actually rendered. The settings field is collapsed by default (on new installations), so the computed DOM width would be invalid
This commit is contained in:
parent
0e57487774
commit
1a3086230e
@ -509,8 +509,11 @@ class ModelDropdown
|
||||
this.modelList.addEventListener('mousemove', this.bind(this.highlightModelAtPosition, this))
|
||||
this.modelList.addEventListener('mousedown', this.bind(this.processClick, this))
|
||||
|
||||
let modelFilterStyle = window.getComputedStyle(this.modelFilter)
|
||||
rootModelList.style.minWidth = modelFilterStyle.width
|
||||
let mf = this.modelFilter
|
||||
this.modelFilter.addEventListener('focus', function() {
|
||||
let modelFilterStyle = window.getComputedStyle(mf)
|
||||
rootModelList.style.minWidth = modelFilterStyle.width
|
||||
})
|
||||
|
||||
this.selectEntry(this.activeModel)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user