function oncontextmenu(e) {
	const $el = e.target;
	const { lock } = $el.dataset;

	if (lock === "true") {
		return; // because button with lock=true is locked when clicked so contextmenu doesn't make sense
	}

	const { editor, activeFile } = editorManager;

	if (isClickMode && appSettings.value.vibrateOnTap) {
		navigator.vibrate(constants.VIBRATION_TIME_LONG);
		$el.classList.add("active");
	}

	const dispatchEventWithTimeout = () => {
		if (time > 50) {
			time -= 10;
		}
		click($el);
		timeout = setTimeout(dispatchEventWithTimeout, time);
	};

	if (activeFile.focused) {
		editor.focus();
	}
	dispatchEventWithTimeout();
}
Handler for contextmenu event
@param {TouchEvent|MouseEvent} e