Hi,

I am using Qx v 1.4.1. and I ran into a an issue around "tabbing" through 
controls as this is implemented in FocusHandler.js. I do not set the tabIndex 
explicitely on widgets and therefore the code falls back to the position and 
eventually the Z-order.

The code marked by the comment "// Sort-Check #2: Top-Position" doesn't always 
work for me because it checks on the top of widgets to exactly match:
      // Sort-Check #2: Top-Position
      if (loc1.top != loc2.top) {
        return loc1.top - loc2.top;
      }

This is not always the case in my layout and I still would like the behaviour 
of tabbing from left to right to controls. As an example of such a layout the 
following "example" with a checkbox in front of a control to implement optional 
behaviour for the value of the actual control:
       ______________
  X  | some control    |
       ---------------------

When in the control and pressing SHIFT + TAB I expect to end up with a checkbox 
having focus but that is not the case.
I tested with a slight adjustment of the code in FocusHandler.__compareTabOrder 
like this

      // Sort-Check #2: Top-Position
      if (loc1.top != loc2.top) {
         // Fallback for slight layout issues, e.g. the top of two controls
         // differs by a (few) pixel(s)
         if ((loc2.bottom < loc1.top) || (loc2.top > loc1.bottom)) {
            // loc2 does not have an overlap in vertical coordinates otherwise
            // we fallback to the diff on "left"
            return loc1.top - loc2.top;
          }
      }

Looking at an overlop in the vertical position of widgets rather than an exact 
match.
My question is:

-        What do you think of this idea?

-        Is this something that could be adjusted/patched in future versions?

Groeten,
Jeroen

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to