don't allow other click handlers to run in parent elements

This commit is contained in:
Bruno Windels 2023-01-13 10:39:44 +01:00
parent 4070d422cd
commit 7b32a2729e

View File

@ -28,7 +28,8 @@ export class ErrorView extends TemplateView<ErrorViewModel> {
override render(t: Builder<ErrorViewModel>, vm: ErrorViewModel): ViewNode {
const submitLogsButton = t.button({
className: "ErrorView_submit",
onClick: disableTargetCallback(async () => {
onClick: disableTargetCallback(async evt => {
evt.stopPropagation();
if (await vm.submitLogs()) {
alert("Logs submitted!");
} else {
@ -38,7 +39,10 @@ export class ErrorView extends TemplateView<ErrorViewModel> {
}, "Submit logs");
const closeButton = t.button({
className: "ErrorView_close",
onClick: () => vm.close(),
onClick: evt => {
evt.stopPropagation();
vm.close();
},
title: "Dismiss error"
});
return t.div({