ICEfaces
  1. ICEfaces
  2. ICE-6466

Improve focus management for ACE components.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      N/A

      Description

      Some YUI components will wipe out and rebuild HTML after submit and update. This causes the focus tracking in the Bridge to not work properly. Therefore, the components need to play a larger role in remembering and re-setting focus.

        Issue Links

          Activity

          Hide
          yip.ng added a comment - - edited

          Read some focus management code in bridge. There are variables (currentFocus, ice.focus, etc) for tracking focus and passing focus states to server. Also, slider entry and tab set seem to use such variables for some focusing. Need to study further to see if same techniques can be used in date time entry.

          Show
          yip.ng added a comment - - edited Read some focus management code in bridge. There are variables (currentFocus, ice.focus, etc) for tracking focus and passing focus states to server. Also, slider entry and tab set seem to use such variables for some focusing. Need to study further to see if same techniques can be used in date time entry.
          Hide
          yip.ng added a comment -

          With the interference from YUI components, (e.g. focus and DOM changes in YUI itself.) the bridge could sometimes lose track of the focus, or focus to the wrong element. If this happens, the component should do at least some focus management on its own, making use of existing bridge focus variables and functions if possible. That's how it's done in tab set and slider. Hard to generalize because each component has its own event handling moments / mechanisms, its own YUI source to modify / override, etc.

          Show
          yip.ng added a comment - With the interference from YUI components, (e.g. focus and DOM changes in YUI itself.) the bridge could sometimes lose track of the focus, or focus to the wrong element. If this happens, the component should do at least some focus management on its own, making use of existing bridge focus variables and functions if possible. That's how it's done in tab set and slider. Hard to generalize because each component has its own event handling moments / mechanisms, its own YUI source to modify / override, etc.
          Hide
          yip.ng added a comment - - edited

          The id of the current focus is stored in the variable currentFocus. This variable is passed to the server as ice.focus on a submit. After the DOM update comes back, focus is re-applied by the framework. This process works fine when all the focus/blur event handling and DOM changes are done by the framework. It starts to break down when YUI does its own focus/blur event handling and DOM changes.

          Therefore, the component needs to make sure that the correct value is set in currentFocus/ice.focus before the submit, and re-applies the correct focus (if the focus is within the component) after the DOM update comes back.

          See tab set, slider entry and date time entry for examples.

          Show
          yip.ng added a comment - - edited The id of the current focus is stored in the variable currentFocus. This variable is passed to the server as ice.focus on a submit. After the DOM update comes back, focus is re-applied by the framework. This process works fine when all the focus/blur event handling and DOM changes are done by the framework. It starts to break down when YUI does its own focus/blur event handling and DOM changes. Therefore, the component needs to make sure that the correct value is set in currentFocus/ice.focus before the submit, and re-applies the correct focus (if the focus is within the component) after the DOM update comes back. See tab set, slider entry and date time entry for examples.

            People

            • Assignee:
              yip.ng
              Reporter:
              yip.ng
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: