Interpret context menu event as right click
This commit is contained in:
parent
aa1ca92f72
commit
5028769b52
|
|
@ -260,8 +260,22 @@ class RecordActionTool implements RecorderTool {
|
||||||
}
|
}
|
||||||
|
|
||||||
onContextMenu(event: MouseEvent) {
|
onContextMenu(event: MouseEvent) {
|
||||||
// in case the web page has a custom context menu
|
if (this._shouldIgnoreMouseEvent(event))
|
||||||
this.onClick(event);
|
return;
|
||||||
|
if (this._actionInProgress(event))
|
||||||
|
return;
|
||||||
|
if (this._consumedDueToNoModel(event, this._hoveredModel))
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._performAction({
|
||||||
|
name: 'click',
|
||||||
|
selector: this._hoveredModel!.selector,
|
||||||
|
position: positionForEvent(event),
|
||||||
|
signals: [],
|
||||||
|
button: 'right',
|
||||||
|
modifiers: 0,
|
||||||
|
clickCount: event.detail
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onPointerDown(event: PointerEvent) {
|
onPointerDown(event: PointerEvent) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue