ICEfaces
  1. ICEfaces
  2. ICE-5491

partialSubmit causing issue where elements on page can no longer be accessed

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.8.1, 1.8.2-EE-GA
    • Fix Version/s: 1.8.2-EE-GA_P01, 1.8.3
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      IE7, just-ice.jar
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      Once this occurs any of the following will correct the focus problem:

      1. Click on the select list again.
      2. Use the "tab" key on the keyboard (pressing it just once resolves the issue).
      3. Reload the page or do anything that causes another partial or full submit.
      Show
      Once this occurs any of the following will correct the focus problem: 1. Click on the select list again. 2. Use the "tab" key on the keyboard (pressing it just once resolves the issue). 3. Reload the page or do anything that causes another partial or full submit.

      Description

      The page has a text box with partialSubmit set true and a selectManyMenu list box. If the exact steps below are followed, you can no longer access elements on the page except for the selectManyMeny list box that had focus. Here are the steps that much be done in this exact order to reproduce the issue:

      1. Set focus on text box
      2. Move mouse over selection on multi select
      3. Enter value in text box
      4. Mouse pointer should still be over selection
      5. Hold CTRL (wait 1 sec)
      6. Click mouse, without moving pointer
      7. (wait 1 sec) Release CTRL
      8. Move mouse down to text box or button as vertically as possible. Notice that you are unable to set focus to either of those components.

        Activity

        Hide
        Tyler Johnson added a comment -

        From what we can tell, the issue can only reproduced with the just-ice.jar.

        Show
        Tyler Johnson added a comment - From what we can tell, the issue can only reproduced with the just-ice.jar.
        Hide
        Adnan Durrani added a comment - - edited

        This is a strange issue. I can see that inputText component already have IE specific focus fix onmousedown="this.focus()".

        This is easily reproduceable. I have noticed that on each update we get the following markup.

        Elememt 0 : <div id="mainForm:stateSavingMarker" style="width:0px;height:0px;"><
        input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id30:j_id48" /></div>
        Elememt 1 : <script id="YR3GMjELqxFjJqANbTpvaA:1:dynamic-code" type="text/javasc
        ript"></script>

        However "javax.faces.ViewState" values keeps changing.

        As we can see that above update snippet doesn't contain any info about inputText or selectManyMenu and doesn't try to set focus on anything.

        I suspected on empty script tag, so tried to not send script tag if it was empty. But same behavior.

        Tried not to render StateSaving div for testing purpose, client side issue was gone, but app was messed up .

        I found one interesting thing.

        The markup of the demo look something like this.
        <dataTable>
        <column>
        <selectManyMenu>
        <inputText PARTIAL_SUBMIT = true>
        </column>

        It produces DOMupdate mentioned above. If I set the partialSubmit on selectManyMenu instead of inputText, then update remains same but focus problem gets fixed.

        <dataTable>
        <column>
        <selectManyMenu PARTIAL_SUBMIT = true>
        <inputText >
        </column>

        As we can see with two different markups one markup is causing focus issue, and second one doesn't, and update was same for both markups, which mean there is nothing wrong with domupdate.

        Problem happens when the input has focus and we select an item from the list using ctrl + mouse click. This cause onblur on inputText which do the partialSubmit and client selects an item from the list. Seems like some thing internally happening within IE that causes the IE focus manager to get confused.

        Show
        Adnan Durrani added a comment - - edited This is a strange issue. I can see that inputText component already have IE specific focus fix onmousedown="this.focus()". This is easily reproduceable. I have noticed that on each update we get the following markup. Elememt 0 : <div id="mainForm:stateSavingMarker" style="width:0px;height:0px;">< input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id30:j_id48" /></div> Elememt 1 : <script id="YR3GMjELqxFjJqANbTpvaA:1:dynamic-code" type="text/javasc ript"></script> However "javax.faces.ViewState" values keeps changing. As we can see that above update snippet doesn't contain any info about inputText or selectManyMenu and doesn't try to set focus on anything. I suspected on empty script tag, so tried to not send script tag if it was empty. But same behavior. Tried not to render StateSaving div for testing purpose, client side issue was gone, but app was messed up . I found one interesting thing. The markup of the demo look something like this. <dataTable> <column> <selectManyMenu> <inputText PARTIAL_SUBMIT = true> </column> It produces DOMupdate mentioned above. If I set the partialSubmit on selectManyMenu instead of inputText, then update remains same but focus problem gets fixed. <dataTable> <column> <selectManyMenu PARTIAL_SUBMIT = true> <inputText > </column> As we can see with two different markups one markup is causing focus issue, and second one doesn't, and update was same for both markups, which mean there is nothing wrong with domupdate. Problem happens when the input has focus and we select an item from the list using ctrl + mouse click. This cause onblur on inputText which do the partialSubmit and client selects an item from the list. Seems like some thing internally happening within IE that causes the IE focus manager to get confused.
        Hide
        Mircea Toma added a comment - - edited

        It seems that the update of javax.faces.ViewState value on each submit is due to the behavior of com.sun.faces.application.StateManagerImpl state manager. When view's state is saved a new identifier is assigned on every JSF lifecycle. Thus the input element holding javax.faces.ViewState's value is updated continuously.

        Show
        Mircea Toma added a comment - - edited It seems that the update of javax.faces.ViewState value on each submit is due to the behavior of com.sun.faces.application.StateManagerImpl state manager. When view's state is saved a new identifier is assigned on every JSF lifecycle. Thus the input element holding javax.faces.ViewState's value is updated continuously.
        Hide
        Ted Goddard added a comment -

        This has been changed in JSF 2.0 for Ajax interaction – Ajax interaction does not result in a new ViewState key.

        Show
        Ted Goddard added a comment - This has been changed in JSF 2.0 for Ajax interaction – Ajax interaction does not result in a new ViewState key.
        Hide
        Ken Fyten added a comment - - edited

        Okay, I've seen this issue now on a couple versions of IE7. Can't reproduce it using Fusion on OSX as for some reason the ctrl key doesn't work to initiate the multi-select in the list. Issue doesn't happen if you don't use ctrl (shift is fine, for example).

        Doesn't happen on IE8.

        Seems to be a very strange IE7 bug/glitch. I'll add some work-arounds.

        Show
        Ken Fyten added a comment - - edited Okay, I've seen this issue now on a couple versions of IE7. Can't reproduce it using Fusion on OSX as for some reason the ctrl key doesn't work to initiate the multi-select in the list. Issue doesn't happen if you don't use ctrl (shift is fine, for example). Doesn't happen on IE8. Seems to be a very strange IE7 bug/glitch. I'll add some work-arounds.
        Hide
        Ken Fyten added a comment -

        Since this is a very specific IE7 glitch there is not much we can do, unfortunately. I have documented several work-arounds in the JIRA on how to regain focusability if it occurs, as well, Adnan has suggested small changes to the partialSubmit config. of the two involved components which also resolves the issue.

        Show
        Ken Fyten added a comment - Since this is a very specific IE7 glitch there is not much we can do, unfortunately. I have documented several work-arounds in the JIRA on how to regain focusability if it occurs, as well, Adnan has suggested small changes to the partialSubmit config. of the two involved components which also resolves the issue.

          People

          • Assignee:
            Tyler Johnson
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: