Skip to main content

Search and Top Navigation

#9012 closed feature (wontfix)

Opened January 25, 2013 12:14PM UTC

Closed January 25, 2013 10:09PM UTC

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 ...

Attachments (0)
Change History (6)

Changed January 25, 2013 12:44PM UTC by jzaefferer comment:1

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.

Changed January 25, 2013 12:50PM UTC by scottgonzalez comment:2

owner: → nix_nix
status: newpending

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

Changed January 25, 2013 01:08PM UTC by nix_nix comment:3

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.

Changed January 25, 2013 01:14PM UTC by scottgonzalez comment:4

status: newpending

So literally everything? You never use key codes and have no use for generating and cleaning up ids?

Changed January 25, 2013 09:20PM UTC by nix_nix comment:5

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.

Changed January 25, 2013 10:09PM UTC by scottgonzalez comment:6

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.