diff --git a/src/ui/pokedex-scan-ui-handler.ts b/src/ui/pokedex-scan-ui-handler.ts index c69d2e58076..524ab76bd83 100644 --- a/src/ui/pokedex-scan-ui-handler.ts +++ b/src/ui/pokedex-scan-ui-handler.ts @@ -103,7 +103,6 @@ export default class PokedexScanUiHandler extends FormModalUiHandler { // args[2] is an index of FilterTextRow - //TODO: This logic is probably way more complex than we need, and actually messes things up for moves and abilities with a space like "Leech Seed" show(args: any[]): boolean { this.row = args[2]; const ui = this.getUi(); @@ -179,4 +178,13 @@ export default class PokedexScanUiHandler extends FormModalUiHandler { } return false; } + + clear(): void { + super.clear(); + + // Clearing the labels so they don't appear again and overlap + this.formLabels.forEach(label => { + label.destroy(); + }); + } }