ICEfaces
  1. ICEfaces
  2. ICE-7777

ice:selectInputText - Rendering based off of entering of text causes issues

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: EE-2.0.0.GA, 3.0
    • Fix Version/s: 3.0.1, EE-3.0.0.GA
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      Wrap the panelGroup that is conditionally rendered in another panelGroup that is always rendered. This will stop the dom differencing propagation from reaching the form, and disrupting the ice:selectInputText.

      <h:panelGroup>
          <h:panelGroup rendered="#{not empty testBean.name}" layout="block">
              ...
          </h:panelGroup>
      </h:panelGroup>
      Show
      Wrap the panelGroup that is conditionally rendered in another panelGroup that is always rendered. This will stop the dom differencing propagation from reaching the form, and disrupting the ice:selectInputText. <h:panelGroup>     <h:panelGroup rendered="#{not empty testBean.name}" layout="block">         ...     </h:panelGroup> </h:panelGroup>

      Description

      Entering some text into the input field causes another component or section to be rendered. If the input field is empty then entering text does not bring up the drop down and it also moved focus to the beginning of the input field. If there is already text in the input field then the drop down displays.

      Similar behavior is seen comparing ICEfaces EE 2.0 and ICEfaces 3.0. The only difference is that focus is lost in 3.0.

        Activity

        Hide
        Arran Mccullough added a comment -

        Attaching test case that shows issue. If you enter in text when it is empty, no drop down is shown and the focus is set to the beginning of the text entered. The initial text entry is causing a panelGroup to be rendered. This seems to be the main cause of the issue.

        Show
        Arran Mccullough added a comment - Attaching test case that shows issue. If you enter in text when it is empty, no drop down is shown and the focus is set to the beginning of the text entered. The initial text entry is causing a panelGroup to be rendered. This seems to be the main cause of the issue.
        Hide
        Mark Collette added a comment -

        The panelGroup becoming rendered when the name bean property goes from empty to non-empty causes the dom difference to update the whole form, including the selectInputText, losing the focus state. The fix is straightforward, simply wrap the panelGroup in another that is always rendered, which will stop the dom difference propagation.

        <h:form id="form">
        ...
        <ice:selectInputText
        ...
        </ice:selectInputText>

        <h:panelGroup rendered="#

        {not empty testBean.name}

        " layout="block">
        ...
        </h:panelGroup>
        </h:form>

        Show
        Mark Collette added a comment - The panelGroup becoming rendered when the name bean property goes from empty to non-empty causes the dom difference to update the whole form, including the selectInputText, losing the focus state. The fix is straightforward, simply wrap the panelGroup in another that is always rendered, which will stop the dom difference propagation. <h:form id="form"> ... <ice:selectInputText ... </ice:selectInputText> <h:panelGroup rendered="# {not empty testBean.name} " layout="block"> ... </h:panelGroup> </h:form>
        Hide
        Mark Collette added a comment -

        Tested if the component's javascript was causing the focus to be lost, since the framework/bridge is rendering an eval to update the focus on the selectInputText's input field, after updating the whole form. But even with the component not running any javascript, the focus updating isn't causing the focus to be re-set on the updated input field. ice.applyFocus('form:autocompleteId'); So, might be a bridge issue.

        Show
        Mark Collette added a comment - Tested if the component's javascript was causing the focus to be lost, since the framework/bridge is rendering an eval to update the focus on the selectInputText's input field, after updating the whole form. But even with the component not running any javascript, the focus updating isn't causing the focus to be re-set on the updated input field. ice.applyFocus('form:autocompleteId'); So, might be a bridge issue.
        Hide
        Mark Collette added a comment -

        Resolvable with application work-around.

        Show
        Mark Collette added a comment - Resolvable with application work-around.

          People

          • Assignee:
            Mark Collette
            Reporter:
            Arran Mccullough
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: