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 1, 2024
1 parent 3506117 commit 692651e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 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 @@ -424,7 +423,7 @@ export default class MarketsPage extends BasePage {
// 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)) {
if (this.forms.currentForm && !Doc.mouseInElement(e, this.forms.currentForm)) {
closePopups()
}
})
Expand Down

0 comments on commit 692651e

Please sign in to comment.