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:


It would be useful for providing a better fix for ... 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 ) { $( ).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 Jörn Zaefferer

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 ( ) that jQuery Mobile could make use of, too.

comment:2 Changed 10 years ago by Scott González

Owner: set to nix_nix
Status: newpending

What in core (that's not deprecated), are you trying to avoid pulling in?

comment:3 Changed 10 years ago by nix_nix

Status: pendingnew
  1. The definition of $.ui
  2. The plugins: $.fn.extend({ _focus: ..., focus: function(...) {...}, scrollParent: function() {...}, ... });
  3. all the sections marked support:
  4. the deprecated section at the end.

comment:4 Changed 10 years ago by Scott González

Status: newpending

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 nix_nix

Status: pendingnew

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 Scott González

Resolution: wontfix
Status: newclosed

Based on discussions in IRC, mobile will pul lin UI core. Over time this will get trimmed down quite a bit anyway.

Note: See TracTickets for help on using tickets.