Opened 10 years ago
Closed 10 years ago
#9012 closed feature (wontfix)
Split :tabbable and :focusable into its own file
Reported by: | nix_nix | Owned by: | nix_nix |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.core | Version: | 1.10.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
It would be useful for providing a better fix for https://github.com/jquery/jquery-mobile/issues/5519 ... we'd copy it into jQM just like the widget factory.
Currently I intercept the focusin and if I find that the destination element e is undesirable, I $( e ).one( "focus", function( e ) { $( e.target ).blur(); } ); and focus an element that's desirable to focus. The problem is that this causes a lot of jumping around.
I'd prefer to create two lists: One of :tabbable elements which are undesirable, and one of those that are desirable. Then, I'd temporarily back up the tabindex of the undesirables and set their tabindex to -1. Thus, I'd restrict the focus chain to the desirables. When the focus restriction is no longer needed, I'd restore the original focus chain. This works much more solidly than my previous solution. However, I need :tabbable ...
Change History (6)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Owner: | set to nix_nix |
---|---|
Status: | new → pending |
What in core (that's not deprecated), are you trying to avoid pulling in?
comment:3 Changed 10 years ago by
Status: | pending → new |
---|
- The definition of $.ui
- The plugins: $.fn.extend({ _focus: ..., focus: function(...) {...}, scrollParent: function() {...}, ... });
- all the sections marked support:
- the deprecated section at the end.
comment:4 Changed 10 years ago by
Status: | new → pending |
---|
So literally everything? You never use key codes and have no use for generating and cleaning up ids?
comment:5 Changed 10 years ago by
Status: | pending → new |
---|
That's a good point about the key codes. We have them defined in mobile as well, so I guess we could move over to your definition. After all, we already have the $.ui namespace because of the widget factory.
So, I guess the keycodes would be welcome in addition to :tabbable.
comment:6 Changed 10 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Based on discussions in IRC, mobile will pul lin UI core. Over time this will get trimmed down quite a bit anyway.
I can see why you'd want those split out, though once we get rid of all the cruft in ui.core, you should be able to just use it as-is. There's useful plugins like uniqueId ( http://api.jqueryui.com/uniqueId/ ) that jQuery Mobile could make use of, too.