Merge pull request #11730 from vvlladd28/bug/show-widget/action

Fixed select widget in touch screen
This commit is contained in:
Igor Kulikov 2024-09-24 13:29:53 +03:00 committed by GitHub
commit 57b533b3a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -200,6 +200,9 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O
} }
onMouseDown(event: MouseEvent) { onMouseDown(event: MouseEvent) {
if (event) {
event.stopPropagation();
}
this.widgetComponentAction.emit({ this.widgetComponentAction.emit({
event, event,
actionType: WidgetComponentActionType.MOUSE_DOWN actionType: WidgetComponentActionType.MOUSE_DOWN
@ -207,6 +210,9 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O
} }
onClicked(event: MouseEvent) { onClicked(event: MouseEvent) {
if (event) {
event.stopPropagation();
}
this.widgetComponentAction.emit({ this.widgetComponentAction.emit({
event, event,
actionType: WidgetComponentActionType.CLICKED actionType: WidgetComponentActionType.CLICKED
@ -214,6 +220,9 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O
} }
onContextMenu(event: MouseEvent) { onContextMenu(event: MouseEvent) {
if (event) {
event.stopPropagation();
}
this.widgetComponentAction.emit({ this.widgetComponentAction.emit({
event, event,
actionType: WidgetComponentActionType.CONTEXT_MENU actionType: WidgetComponentActionType.CONTEXT_MENU
@ -221,6 +230,9 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O
} }
onEdit(event: MouseEvent) { onEdit(event: MouseEvent) {
if (event) {
event.stopPropagation();
}
this.widgetComponentAction.emit({ this.widgetComponentAction.emit({
event, event,
actionType: WidgetComponentActionType.EDIT actionType: WidgetComponentActionType.EDIT
@ -228,6 +240,9 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O
} }
onReplaceReferenceWithWidgetCopy(event: MouseEvent) { onReplaceReferenceWithWidgetCopy(event: MouseEvent) {
if (event) {
event.stopPropagation();
}
this.widgetComponentAction.emit({ this.widgetComponentAction.emit({
event, event,
actionType: WidgetComponentActionType.REPLACE_REFERENCE_WITH_WIDGET_COPY actionType: WidgetComponentActionType.REPLACE_REFERENCE_WITH_WIDGET_COPY
@ -235,6 +250,9 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O
} }
onExport(event: MouseEvent) { onExport(event: MouseEvent) {
if (event) {
event.stopPropagation();
}
this.widgetComponentAction.emit({ this.widgetComponentAction.emit({
event, event,
actionType: WidgetComponentActionType.EXPORT actionType: WidgetComponentActionType.EXPORT
@ -242,6 +260,9 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O
} }
onRemove(event: MouseEvent) { onRemove(event: MouseEvent) {
if (event) {
event.stopPropagation();
}
this.widgetComponentAction.emit({ this.widgetComponentAction.emit({
event, event,
actionType: WidgetComponentActionType.REMOVE actionType: WidgetComponentActionType.REMOVE