ICEfaces
  1. ICEfaces
  2. ICE-9620

compat/ice row:selector toggleoninput selector with keyboardNavigationEnabled causes problems with inputtext field

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P01, 4.0.BETA
    • Fix Version/s: 4.0.BETA, EE-3.3.0.GA_P02, 4.0
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      jsf 2 compat ice
    • Assignee Priority:
      P2
    • Salesforce Case Reference:

      Description

      to reproduce, can use on-line showcase example, or current trunk and go to ice tab on showcase example app.

      Choose "ice:rowSelector
                         > Toggle on Input "
      example.
      the row selector styling shows mouse click selecting and deselecting rows correctly, however, when you
      check the checkbox for "Toggle Row Selection on Input?"
      you can then see that any input on the inputbox will deselect the row (first keypress will deselect the row, submit and then input field is dead/disabled).
      Should the row selection toggle on input be allowed to listen for keypress as well as mouse actions? If keypress is not allowed for the Toggle on Input, then the inputText field would still be active.

        Issue Links

          Activity

          Hide
          Judy Guglielmin added a comment - - edited

          workaround, if you don't need keyboard navigation is the following (again using showcase example):_
          <ice:rowSelector value="#

          {car.selected}

          "
          multiple="true"
          keyboardNavigationEnabled="false"
          toggleOnInput="#

          {selectorToggle.enable}

          "/>

          then you can once again enter in the input field. problem is toggleOnInput with keyboardNavigationEnabled causes inputText problems...will rename Jira
          Since keyboardNavigationEnabled defaults to "true", workaround must have the attribute set to false to use toggleOnInput with any inputText fields on the page. (any keypress is currently triggering the toggleOnInput)

          Show
          Judy Guglielmin added a comment - - edited workaround, if you don't need keyboard navigation is the following (again using showcase example):_ <ice:rowSelector value="# {car.selected} " multiple="true" keyboardNavigationEnabled="false" toggleOnInput="# {selectorToggle.enable} "/> then you can once again enter in the input field. problem is toggleOnInput with keyboardNavigationEnabled causes inputText problems...will rename Jira Since keyboardNavigationEnabled defaults to "true", workaround must have the attribute set to false to use toggleOnInput with any inputText fields on the page. (any keypress is currently triggering the toggleOnInput)
          Hide
          Judy Guglielmin added a comment -

          in summary:-
          <ice:rowSelector value="#

          {car.selected}"
          multiple="true"
          keyboardNavigationEnabled="false"
          toggleOnInput="#{selectorToggle.enable}"/>
          allows input on any inputField (inputText example)

          <ice:rowSelector value="#{car.selected}

          "
          multiple="true"
          keyboardNavigationEnabled="true"
          toggleOnInput="#

          {selectorToggle.enable}

          "/>

          Does not allow any input into an inputText component. The commandButton is OK.

          Also, to note that using the arrows on the rowSelector is not very consistent (using Chrome). If I click on a row with a mouse then all of a sudden that limits the range that the up/down arrows can access. have not tried this on another browser.
          (this is true for any value of toggleOnInput).

          Show
          Judy Guglielmin added a comment - in summary:- <ice:rowSelector value="# {car.selected}" multiple="true" keyboardNavigationEnabled="false" toggleOnInput="#{selectorToggle.enable}"/> allows input on any inputField (inputText example) <ice:rowSelector value="#{car.selected} " multiple="true" keyboardNavigationEnabled="true" toggleOnInput="# {selectorToggle.enable} "/> Does not allow any input into an inputText component. The commandButton is OK. Also, to note that using the arrows on the rowSelector is not very consistent (using Chrome). If I click on a row with a mouse then all of a sudden that limits the range that the up/down arrows can access. have not tried this on another browser. (this is true for any value of toggleOnInput).
          Hide
          Ken Fyten added a comment -

          Assigned to Mircea.

          The issue is complicated by the intermingling of several features; toggleOnInput, keyboardNavigationEnabled, and possibly the bridge focus-retention mechanism.

          With toggleOnInput=true, and the default keyboardNavigationEnabled=true, in all browsers but Chrome (which we'll consider outside scope), you see the following sequence of events using the ICEfaces Showcase / ICE / ice:rowSelector->toggleOnInput demo:

          1. Clicking on a row, but not over an input element, selects the row and focus is apparently set on the hidden element we use for keyboardNavigation = correct.
          2. At this point, the dataTable has focus, so using the up/dwn arrows will set focus on the hidden element used for keyboardNavigation and the row selector highlight will move through the table. Pressing Spacebar will select or deselect the highlighted row = correct.
          3. However, clicking over the inputText field in the dataTable row will set focus on the inputText, then submit the row selection event (correct so far), but when the row selection event submit returns, the update appears to set focus on the hidden element used for keyboardNavigation = incorrect. At this point, focus should stay on the inputText so the user can enter data. Not sure if this is due to bridge focus retention scheme or what, but the rowSelector hidden element should only be focussed if focus isn't already on an input element on the row.
          Show
          Ken Fyten added a comment - Assigned to Mircea. The issue is complicated by the intermingling of several features; toggleOnInput, keyboardNavigationEnabled, and possibly the bridge focus-retention mechanism. With toggleOnInput=true, and the default keyboardNavigationEnabled=true, in all browsers but Chrome (which we'll consider outside scope), you see the following sequence of events using the ICEfaces Showcase / ICE / ice:rowSelector->toggleOnInput demo: Clicking on a row, but not over an input element, selects the row and focus is apparently set on the hidden element we use for keyboardNavigation = correct. At this point, the dataTable has focus, so using the up/dwn arrows will set focus on the hidden element used for keyboardNavigation and the row selector highlight will move through the table. Pressing Spacebar will select or deselect the highlighted row = correct. However, clicking over the inputText field in the dataTable row will set focus on the inputText, then submit the row selection event (correct so far), but when the row selection event submit returns, the update appears to set focus on the hidden element used for keyboardNavigation = incorrect. At this point, focus should stay on the inputText so the user can enter data. Not sure if this is due to bridge focus retention scheme or what, but the rowSelector hidden element should only be focussed if focus isn't already on an input element on the row.
          Hide
          Mircea Toma added a comment -

          Stop moving focus on the hidden anchor before submitting (this is in Ice.tableRowClicked). Move focus on the anchor when the row receives focus so that the keyboard navigation kicks in.

          Show
          Mircea Toma added a comment - Stop moving focus on the hidden anchor before submitting (this is in Ice.tableRowClicked). Move focus on the anchor when the row receives focus so that the keyboard navigation kicks in.
          Hide
          Mircea Toma added a comment -

          Back-ported fix.

          Show
          Mircea Toma added a comment - Back-ported fix.

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Judy Guglielmin
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: