mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 14:45:35 +00:00
Continued porting to react
This commit is contained in:
@@ -14,6 +14,17 @@ export function wrapCtxMenu(cb) {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop context menu / right-click propagation unless shift is held.
|
||||
* @param {SyntheticEvent} event Event
|
||||
*/
|
||||
export function stopCtxPropagation(event) {
|
||||
if (!event.getModifierState('Shift')) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares A and B and return true using strict comparison (===)
|
||||
* @param {any} objA A
|
||||
|
||||
Reference in New Issue
Block a user