Commit d6df765
fix: store bound synccomplete handler so dispose() actually removes it
TextView.dispose() called removeEventListener with .bind(this), which
creates a new function reference. The original listener was added with
a different .bind(this) call, so removeEventListener silently failed
and the listener was never removed.
Store the bound function as a class property and use the same reference
for both addEventListener and removeEventListener.
Fixes #178
Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com>1 parent a546487 commit d6df765
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| |||
372 | 373 | | |
373 | 374 | | |
374 | 375 | | |
375 | | - | |
| 376 | + | |
376 | 377 | | |
377 | 378 | | |
378 | 379 | | |
| |||
413 | 414 | | |
414 | 415 | | |
415 | 416 | | |
416 | | - | |
| 417 | + | |
417 | 418 | | |
418 | 419 | | |
419 | 420 | | |
| |||
0 commit comments