mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
don't allow other click handlers to run in parent elements
This commit is contained in:
parent
4070d422cd
commit
7b32a2729e
@ -28,7 +28,8 @@ export class ErrorView extends TemplateView<ErrorViewModel> {
|
|||||||
override render(t: Builder<ErrorViewModel>, vm: ErrorViewModel): ViewNode {
|
override render(t: Builder<ErrorViewModel>, vm: ErrorViewModel): ViewNode {
|
||||||
const submitLogsButton = t.button({
|
const submitLogsButton = t.button({
|
||||||
className: "ErrorView_submit",
|
className: "ErrorView_submit",
|
||||||
onClick: disableTargetCallback(async () => {
|
onClick: disableTargetCallback(async evt => {
|
||||||
|
evt.stopPropagation();
|
||||||
if (await vm.submitLogs()) {
|
if (await vm.submitLogs()) {
|
||||||
alert("Logs submitted!");
|
alert("Logs submitted!");
|
||||||
} else {
|
} else {
|
||||||
@ -38,7 +39,10 @@ export class ErrorView extends TemplateView<ErrorViewModel> {
|
|||||||
}, "Submit logs");
|
}, "Submit logs");
|
||||||
const closeButton = t.button({
|
const closeButton = t.button({
|
||||||
className: "ErrorView_close",
|
className: "ErrorView_close",
|
||||||
onClick: () => vm.close(),
|
onClick: evt => {
|
||||||
|
evt.stopPropagation();
|
||||||
|
vm.close();
|
||||||
|
},
|
||||||
title: "Dismiss error"
|
title: "Dismiss error"
|
||||||
});
|
});
|
||||||
return t.div({
|
return t.div({
|
||||||
|
Loading…
Reference in New Issue
Block a user