Skip to content

Commit 3094763

Browse files
committed
Render dropdown items in the same order regardless of render direction
Close #10082
1 parent ef1ac97 commit 3094763

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/common/gui/base/Dropdown.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,6 @@ export class Dropdown implements ModalComponent {
168168
}
169169
})
170170

171-
if (this._renderDirection === "up") visibleChildren.reverse()
172-
173171
return m(
174172
".dropdown-content.scroll",
175173
{
@@ -199,12 +197,6 @@ export class Dropdown implements ModalComponent {
199197
const viewportChanged = this.viewportHeight !== newViewportHeight
200198
this.viewportHeight = newViewportHeight
201199

202-
if (this._renderDirection === "up") {
203-
const buttons = (vnode.dom as HTMLElement).getElementsByTagName("button")
204-
const firstButton = buttons.item(buttons.length - 1)
205-
firstButton?.scrollIntoView(false)
206-
}
207-
208200
if (this.origin && (firstRender || heightChanged || viewportChanged)) {
209201
const keyboardHeight = this._initialInnerHeight - newViewportHeight
210202
const animate = firstRender ? undefined : false

0 commit comments

Comments
 (0)