dynamically translating kbd based on actions

This commit is contained in:
zadam
2019-11-22 22:35:59 +01:00
parent 98c81faedb
commit ff0245f05f
7 changed files with 54 additions and 32 deletions

View File

@@ -1,3 +1,4 @@
import keyboardActionService from './keyboard_actions.js';
const $contextMenuContainer = $("#context-menu-container");
let dateContextMenuOpenedMs = 0;
@@ -69,6 +70,8 @@ async function initContextMenu(event, contextMenu) {
addItems($contextMenuContainer, await contextMenu.getContextMenuItems());
keyboardActionService.updateKbdElements($contextMenuContainer);
// code below tries to detect when dropdown would overflow from page
// in such case we'll position it above click coordinates so it will fit into client
const clickPosition = event.pageY;