mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Fix intermittent bug
Dunno why, but this recently started occuring for me in dev and test. Browser update?
This commit is contained in:
@@ -73,7 +73,9 @@ export default class PopoutController extends Controller {
|
||||
}
|
||||
|
||||
closeIfOutside(e) {
|
||||
if (!this.dialogTarget.contains(e.target)) {
|
||||
// Note that we need to ignore the clicked button. Even though the listener was only just
|
||||
// registered, it still fires sometimes for some unkown reason.
|
||||
if (!this.dialogTarget.contains(e.target) && !this.buttonTarget.contains(e.target)) {
|
||||
this.close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user