Content
View differences
Updated by Henriette Darge over 8 years ago
### Situation
When opening a context menu the ng-contextMenu Service returns a promise once the menu is opened. After that we set the focus to the first element.
See: https://github.com/opf/openproject/blob/dev/frontend/app/components/context-menus/has-dropdown-menu/has-dropdown-menu-directive.ts\#L77
### Actual behavior
Sometimes the promise is returned too early. Then the menu is not rendered yet and the focus cannot be set. This happens for example when opening the WP-Create menu the first time after a reload. Another example is the new WP-Status button.
### Expected behavior
Primarily the focus should be set correctly for accessibility reasons. We could achieve this by replacing the library used for creating the context menu. When doing so be sure to replace this for all context menus in the system.
When opening a context menu the ng-contextMenu Service returns a promise once the menu is opened. After that we set the focus to the first element.
See: https://github.com/opf/openproject/blob/dev/frontend/app/components/context-menus/has-dropdown-menu/has-dropdown-menu-directive.ts\#L77
### Actual behavior
Sometimes the promise is returned too early. Then the menu is not rendered yet and the focus cannot be set. This happens for example when opening the WP-Create menu the first time after a reload. Another example is the new WP-Status button.
### Expected behavior
Primarily the focus should be set correctly for accessibility reasons. We could achieve this by replacing the library used for creating the context menu. When doing so be sure to replace this for all context menus in the system.