Skip to content

Commit

Permalink
app: Fix market page form close
Browse files Browse the repository at this point in the history
Fixes a bug related to closing popups on the market page.
  • Loading branch information
martonp committed Nov 8, 2024
1 parent 3506117 commit 343815b
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions client/webserver/site/src/js/markets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ export default class MarketsPage extends BasePage {
maxLoaded: (() => void) | null
maxOrderUpdateCounter: number
market: CurrentMarket
currentForm: HTMLElement
openAsset: SupportedAsset
currentCreate: SupportedAsset
maxEstimateTimer: number | null
Expand Down Expand Up @@ -421,14 +420,6 @@ export default class MarketsPage extends BasePage {
this.forms.close()
}

// If the user clicks outside of a form, it should close the page overlay.
bind(page.forms, 'mousedown', (e: MouseEvent) => {
if (Doc.isDisplayed(page.vDetailPane) && !Doc.mouseInElement(e, page.vDetailPane)) return this.showVerifyForm()
if (!Doc.mouseInElement(e, this.currentForm)) {
closePopups()
}
})

this.keyup = (e: KeyboardEvent) => {
if (e.key === 'Escape') {
closePopups()
Expand Down

0 comments on commit 343815b

Please sign in to comment.