Comments (17)
This has been implemented in 1.2.0
from ngx-contextmenu.
Which specific element should the focus be applied to? The <ul>
, the first <li>
, or the <a>
/<span>
inside the first <li>
?
from ngx-contextmenu.
I think the focus should apply to <ul>
from ngx-contextmenu.
I tested yours changes here(https://isaacplmann.github.io/ngx-contextmenu/). But up and down keys don't work for navigation inside the context menu.
from ngx-contextmenu.
Correct. To navigate with the keyboard, you need to use tab
, shift-tab
, enter
and esc
. I spent about a half hour trying to get arrow keys to work and then backed out those changes because it was getting really complicated.
from ngx-contextmenu.
I understand. Do you plan to do this navigation in the future?
from ngx-contextmenu.
Probably not. Unless I figure out how to do it in a simple and maintainable way. tab
and shift-tab
work by using the browser's built in mechanism for changing focus - which I couldn't figure out a way to tap into.
from ngx-contextmenu.
@isaacplmann
I prepared pull request with navigation inside context menu #35
In my opinion, after merging this changes autofocus should be removed.
from ngx-contextmenu.
Thanks for the contribution! I'll take a look.
from ngx-contextmenu.
PR #35 is incorporated into version 1.3.0.
from ngx-contextmenu.
When using context menu with Bootstrap 4, class 'active' don't apply to item inside a menu. I found that you use bootstrap 3. The workaround for Bootstrap 4 is below:
body {
context-menu-content {
.dropdown-menu {
.active {
.dropdown-item {
color: #fff;
text-decoration: none;
background-color: #0275d8;
}
}
}
}
}
from ngx-contextmenu.
It looks like bootstrap 4 expects .dropdown-menu
to have child .dropdown-item
s that then have .active
class applied to them. I'm missing the .dropdown-item
class. I'll add that to the template.
from ngx-contextmenu.
There are used .dropdown-item:active for styling item
from ngx-contextmenu.
Also, focus and navigation are async. Tabbing through disabled item is correct flow, or not.
from ngx-contextmenu.
Yes, I don't plan to try to synchronize tab focus and the keyboard navigation. This way you can tab through available links just like normal - I'm not hijacking the tab key at all.
from ngx-contextmenu.
If you don't like the focus, just turn off autoFocus.
from ngx-contextmenu.
This should be fixed in 1.3.1
from ngx-contextmenu.
Related Issues (20)
- Can't install with Angular 12.0.1 HOT 1
- Support Angular 11 and 12 HOT 1
- Long touch does not trigger in ios mobile devices
- Context menu is not working in Angular 9 HOT 1
- contextMenuService not showing the menus in angular 11 HOT 4
- Unable to render nested submenu
- Contextmenu is broken in Angular 13 HOT 16
- Can't bind to 'subMenu' since it isn't a known property of 'ng-template'.
- Disable the context-menu if the contextMenuSubject is empty or undefined
- Blank context menu issue when there is no context menu to show
- Angular 12
- In bootstrap model popup , context menu is not getting on right click on grid/cell in angular
- Archiving the repo HOT 2
- delay on close
- ngx context menu with filtering ability
- ngx-contextmenu does not support with angular 14. HOT 2
- contextMenu not bind With Html in angular 12.
- Accessibility issue with Context Menu-Confirmation needed HOT 3
- Support for Angular 16 HOT 3
- Default css doesn't work on Angular 7 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-contextmenu.