From 7e3fb19f0eb7d38944546773a91b0709cc1146b6 Mon Sep 17 00:00:00 2001 From: JanAckermann Date: Thu, 7 Jul 2022 11:40:10 +0200 Subject: [PATCH 1/5] Calc dropdown position by trigger button instead of pointer event --- .../src/components/FilesList/ResourceTable.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/web-app-files/src/components/FilesList/ResourceTable.vue b/packages/web-app-files/src/components/FilesList/ResourceTable.vue index 3ca6c482747..2de91f6c8c2 100644 --- a/packages/web-app-files/src/components/FilesList/ResourceTable.vue +++ b/packages/web-app-files/src/components/FilesList/ResourceTable.vue @@ -135,6 +135,7 @@ ({ width: 0, height: 0, - top: event.clientY, - bottom: event.clientY, - left: event.clientX, - right: event.clientX + top: contextMenuButtonPos.top, + bottom: contextMenuButtonPos.bottom, + left: contextMenuButtonPos.x, + right: contextMenuButtonPos.x }) }) + dropdown.show() }, rowMounted(resource, component) { From 3a1005acdcc595002b452e99efbeefd79fb6706f Mon Sep 17 00:00:00 2001 From: JanAckermann Date: Thu, 7 Jul 2022 11:50:40 +0200 Subject: [PATCH 2/5] Calc position wether mouse or keyboard event --- .../src/components/FilesList/ResourceTable.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/web-app-files/src/components/FilesList/ResourceTable.vue b/packages/web-app-files/src/components/FilesList/ResourceTable.vue index 2de91f6c8c2..7ba9031749d 100644 --- a/packages/web-app-files/src/components/FilesList/ResourceTable.vue +++ b/packages/web-app-files/src/components/FilesList/ResourceTable.vue @@ -655,10 +655,10 @@ export default defineComponent({ getReferenceClientRect: () => ({ width: 0, height: 0, - top: contextMenuButtonPos.top, - bottom: contextMenuButtonPos.bottom, - left: contextMenuButtonPos.x, - right: contextMenuButtonPos.x + top: event.pointerType === 'mouse' ? event.clientY : contextMenuButtonPos.top, + bottom: event.pointerType === 'mouse' ? event.clientY : contextMenuButtonPos.bottom, + left: event.pointerType === 'mouse' ? event.clientX : contextMenuButtonPos.x, + right: event.pointerType === 'mouse' ? event.clientX : contextMenuButtonPos.x }) }) From 4fab86b1a12adfe93f59ab927e76da2d3569cd78 Mon Sep 17 00:00:00 2001 From: JanAckermann Date: Thu, 7 Jul 2022 11:54:12 +0200 Subject: [PATCH 3/5] Add changelog item --- ...x-context-menu-misplaced-when-triggered-by-keyboard-navigation | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 changelog/unreleased/bugfix-context-menu-misplaced-when-triggered-by-keyboard-navigation diff --git a/changelog/unreleased/bugfix-context-menu-misplaced-when-triggered-by-keyboard-navigation b/changelog/unreleased/bugfix-context-menu-misplaced-when-triggered-by-keyboard-navigation new file mode 100644 index 00000000000..e69de29bb2d From fc9777d10859720fb2474ba3fd5cc48c39527c03 Mon Sep 17 00:00:00 2001 From: JanAckermann Date: Thu, 7 Jul 2022 12:01:29 +0200 Subject: [PATCH 4/5] Add changelog item --- ...ugfix-context-menu-misplaced-triggered-by-keyboard-navigation} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog/unreleased/{bugfix-context-menu-misplaced-when-triggered-by-keyboard-navigation => bugfix-context-menu-misplaced-triggered-by-keyboard-navigation} (100%) diff --git a/changelog/unreleased/bugfix-context-menu-misplaced-when-triggered-by-keyboard-navigation b/changelog/unreleased/bugfix-context-menu-misplaced-triggered-by-keyboard-navigation similarity index 100% rename from changelog/unreleased/bugfix-context-menu-misplaced-when-triggered-by-keyboard-navigation rename to changelog/unreleased/bugfix-context-menu-misplaced-triggered-by-keyboard-navigation From 34cc3c806af122e0c3bc52e1cbf86bb463db2172 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 7 Jul 2022 12:02:20 +0200 Subject: [PATCH 5/5] Update bugfix-context-menu-misplaced-triggered-by-keyboard-navigation --- ...-context-menu-misplaced-triggered-by-keyboard-navigation | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/changelog/unreleased/bugfix-context-menu-misplaced-triggered-by-keyboard-navigation b/changelog/unreleased/bugfix-context-menu-misplaced-triggered-by-keyboard-navigation index e69de29bb2d..61d3e0a52e5 100644 --- a/changelog/unreleased/bugfix-context-menu-misplaced-triggered-by-keyboard-navigation +++ b/changelog/unreleased/bugfix-context-menu-misplaced-triggered-by-keyboard-navigation @@ -0,0 +1,6 @@ +Bugfix: Context menu misplaced when triggered by keyboard navigation + +We've fixed a bug where triggering the context menu by keyboard navigation misplaced the menu and made it inaccessible. + +https://github.com/owncloud/web/pull/7230 +https://github.com/owncloud/web/issues/7187