ICEfaces
  1. ICEfaces
  2. ICE-8348

Focus is lost with a disabled ice:selectOneMenu on the page in IE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: EE-1.8.2.GA_P04
    • Fix Version/s: EE-1.8.2.GA_P05
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      IE8
    • Assignee Priority:
      P2

      Description

      If there is a disabled ice:selectOneMenu and a partialSubmit is executed, focus is lost in IE8. For some reason the disabled menu is getting updated on the partialSubmit. If the menu is not disabled then it is not part of the updates.

      This issue is only seen in IE8, testing in IE9, the same update can be seen but the focus remains on the correct component.

        Activity

        Hide
        Arran Mccullough added a comment -

        Attached test case that shows issue.

        Steps:

        • Load welcomeICEfaces.iface
        • Focus into the "Hello" input field.
        • Click the Tab key, focus is sent to the "World" input field. This has partialSubmit=true
        • Click the Tab key again, in IE8, the focus is sent to the button but then is gone. Looking at the console output the disabled selectOneMenu is the only thing in the update.
        Show
        Arran Mccullough added a comment - Attached test case that shows issue. Steps: Load welcomeICEfaces.iface Focus into the "Hello" input field. Click the Tab key, focus is sent to the "World" input field. This has partialSubmit=true Click the Tab key again, in IE8, the focus is sent to the button but then is gone. Looking at the console output the disabled selectOneMenu is the only thing in the update.
        Hide
        yip.ng added a comment - - edited

        Root cause is the mismatch of the <select> value and <selectItem> value. See scrennshot-1.png. This somehow causes the framework to do an extra (unnecessary?) DOM update. See screenshot-2.png. That in turn somehow breaks the framework focus management in IE8.

        Show
        yip.ng added a comment - - edited Root cause is the mismatch of the <select> value and <selectItem> value. See scrennshot-1.png. This somehow causes the framework to do an extra (unnecessary?) DOM update. See screenshot-2.png. That in turn somehow breaks the framework focus management in IE8.
        Hide
        Ted Goddard added a comment -

        Initial state

        <select class="iceSelOneMnu-dis"
        disabled="disabled"
        id="iceForm:j_id12"
        name="iceForm:j_id12"
        onblur="setFocus('');"
        onfocus="setFocus(this.id);"
        size="1">
        <option value="1">Number1 - 1</option>
        </select>

        submission:

        ice.submit.partial=true&ice.event.target=iceForm%3Aj_id16&ice.event.captured=iceForm%3Aj_id16&ice.event.type=onblur&iceForm%3Aj_id16=World&iceForm%3Aj_id12=1&iceForm%3Aj_id10=Hello&javax.faces.RenderKitId=ICEfacesRenderKit&javax.faces.ViewState=2&icefacesCssUpdates=&iceForm=&ice.session=45g-TMkrJ-gOLbMo7N6zJQ&ice.view=2&ice.focus=&rand=0.6510431396309286

        Update:

        <updates><update address="iceForm:j_id12" tag="select"><attribute name="class"><Unable to render embedded object: File ([CDATA[iceSelOneMnu-dis]]></attribute><attribute name="disabled"><) not found.[CDATA[disabled]]></attribute><attribute name="id"><Unable to render embedded object: File (j_id12]]></attribute><attribute name="name"><) not found.[CDATA[iceForm:j_id12]]></attribute><attribute name="onblur"><Unable to render embedded object: File ([CDATA[setFocus('');]]></attribute><attribute name="onfocus"><) not found.[CDATA[setFocus(this.id);]]></attribute><attribute name="size"><Unable to render embedded object: File ([CDATA[1]]></attribute><content><) not found.[CDATA[<option value="1">Number1 - 1</option>]]></content></update></updates>

        Show
        Ted Goddard added a comment - Initial state <select class="iceSelOneMnu-dis" disabled="disabled" id="iceForm:j_id12" name="iceForm:j_id12" onblur="setFocus('');" onfocus="setFocus(this.id);" size="1"> <option value="1">Number1 - 1</option> </select> submission: ice.submit.partial=true&ice.event.target=iceForm%3Aj_id16&ice.event.captured=iceForm%3Aj_id16&ice.event.type=onblur&iceForm%3Aj_id16=World&iceForm%3Aj_id12=1&iceForm%3Aj_id10=Hello&javax.faces.RenderKitId=ICEfacesRenderKit&javax.faces.ViewState=2&icefacesCssUpdates=&iceForm=&ice.session=45g-TMkrJ-gOLbMo7N6zJQ&ice.view=2&ice.focus=&rand=0.6510431396309286 Update: <updates><update address="iceForm:j_id12" tag="select"><attribute name="class">< Unable to render embedded object: File ([CDATA[iceSelOneMnu-dis]]></attribute><attribute name="disabled"><) not found. [CDATA [disabled] ]></attribute><attribute name="id">< Unable to render embedded object: File (j_id12]]></attribute><attribute name="name"><) not found. [CDATA [iceForm:j_id12] ]></attribute><attribute name="onblur">< Unable to render embedded object: File ([CDATA[setFocus('');]]></attribute><attribute name="onfocus"><) not found. [CDATA [setFocus(this.id);] ]></attribute><attribute name="size">< Unable to render embedded object: File ([CDATA[1]]></attribute><content><) not found. [CDATA [<option value="1">Number1 - 1</option>] ]></content></update></updates>
        Hide
        yip.ng added a comment -

        [4:32:46 PM] Mark Collette: App workaround for ICE-8348

        <ice:selectOneMenu value="1" disabled="true>
        <f:selectItem itemValue="1" itemLabel="Number1 - 1"/>

        or

        <ice:selectOneMenu value="" disabled="true>
        <f:selectItem itemValue="" itemLabel="Please select a number"/>
        <f:selectItem itemValue="1" itemLabel="Number1 - 1"/>

        Show
        yip.ng added a comment - [4:32:46 PM] Mark Collette: App workaround for ICE-8348 <ice:selectOneMenu value="1" disabled="true> <f:selectItem itemValue="1" itemLabel="Number1 - 1"/> or <ice:selectOneMenu value="" disabled="true> <f:selectItem itemValue="" itemLabel="Please select a number"/> <f:selectItem itemValue="1" itemLabel="Number1 - 1"/>

          People

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

            Dates

            • Created:
              Updated:
              Resolved: