fix: stop media stream on hide

When the image capture dialog is hidden, stop the media stream.
Didn't work becasue function was executed during setup.
This commit is contained in:
barredterra 2023-08-21 13:50:38 +02:00
parent 4888e85df1
commit 41f38f5bc6

View file

@ -98,7 +98,9 @@ frappe.ui.Capture = class {
fieldname: "total_count",
},
],
on_hide: this.stop_media_stream(),
on_hide: () => {
this.stop_media_stream();
},
});
me.$template = $(frappe.ui.Capture.TEMPLATE);