ICEfaces
  1. ICEfaces
  2. ICE-8647

Different behavior of partialSubmit/singleSubmit in clients (was: Different behavior of partialSubmit in clients)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.0.0.GA_P01, 3.2.BETA1
    • Fix Version/s: EE-3.2.0.BETA, EE-3.2.0.GA, 3.3
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Chrome, Firefox, Internet Explorer, Tomcat 7
    • Assignee Priority:
      P1
    • Salesforce Case Reference:

      Description


      In attached test case focus the drop down menu via tabulator key and type 41 quickly

      In Chrome, IE8, IE9 with enabled partial submit as soon as you type 4, 2 things will happen:
      1. Second drop down will be rendered
      2. First drop down will loose its focus due to submission on change

      In Firefox second drop down will not be rendered until you tab out from the first one. Seems like in this case submission is only triggered on blur.

      By default partial submit should be fired on blur in all clients which clearly does not happen here.

        Activity

        Hide
        Evgheni Sadovoi added a comment - - edited

        This is also applicable to <icecore:singleSubmit submitOnBlur="true"/> case. As it fire itself on change in Chrome and IE despite its submitOnBlur parameter value.

        Show
        Evgheni Sadovoi added a comment - - edited This is also applicable to <icecore:singleSubmit submitOnBlur="true"/> case. As it fire itself on change in Chrome and IE despite its submitOnBlur parameter value.
        Hide
        Arturo Zambrano added a comment - - edited

        I made the following analysis of how the ice:selectOneMenu element behaves in different browsers when partialSubmit=true in order to make a more thorough modification to make the component behave more uniformly across browsers ('yes' means that a request is sent to the server when performing that action).

        Action FF IE9 Chrome
        clicking on option with mouse yes yes yes
        focused, with list closed, and using arrow keys to highlight different options no yes yes
        focused, with list open, and using arrow keys to highlight different options no no no
        focused and pressing enter yes yes yes
        opening list, hovering over option to highlight it, then closing list no no no
        focused, pressing letter/number that doesn't select a new value no no no
        focused, pressing letter/number that does select a new value no yes yes

        In short, the only difference is that FF lets you select any option(s) you want and waits until you leave the field to fire the onchange event.

        So, a new attribute, tentatively called 'partialSubmitOnBlur', would be added to ice:selectManyListbox, ice:selectManyMenu, ice:selectOneListbox, and ice:selectOneMenu. This attribute would control the behaviour of the <select> element, rendered by these components, and make it work in the same way across browsers.

        Show
        Arturo Zambrano added a comment - - edited I made the following analysis of how the ice:selectOneMenu element behaves in different browsers when partialSubmit=true in order to make a more thorough modification to make the component behave more uniformly across browsers ('yes' means that a request is sent to the server when performing that action). Action FF IE9 Chrome clicking on option with mouse yes yes yes focused, with list closed, and using arrow keys to highlight different options no yes yes focused, with list open, and using arrow keys to highlight different options no no no focused and pressing enter yes yes yes opening list, hovering over option to highlight it, then closing list no no no focused, pressing letter/number that doesn't select a new value no no no focused, pressing letter/number that does select a new value no yes yes In short, the only difference is that FF lets you select any option(s) you want and waits until you leave the field to fire the onchange event. So, a new attribute, tentatively called 'partialSubmitOnBlur', would be added to ice:selectManyListbox, ice:selectManyMenu, ice:selectOneListbox, and ice:selectOneMenu. This attribute would control the behaviour of the <select> element, rendered by these components, and make it work in the same way across browsers.
        Hide
        Evgheni Sadovoi added a comment - - edited

        The goal of the JIRA is to standardize behavior of the partial and single submits across different browsers by only firing submits on blur rather then on change. This in turn should prevent an undesirable change of states in UI due to the fast typing in any application. (lost of focus from the first drop down upon key "4" release)

        Show
        Evgheni Sadovoi added a comment - - edited The goal of the JIRA is to standardize behavior of the partial and single submits across different browsers by only firing submits on blur rather then on change. This in turn should prevent an undesirable change of states in UI due to the fast typing in any application. (lost of focus from the first drop down upon key "4" release)
        Hide
        Ken Fyten added a comment -

        Evgheni, we cannot retroactively change the default behavior of all browsers but FF as it will break backwards behavorial compatibility. To support what the customer wants we will need to create a new configuration that the can invoke that only submits onblur.

        Show
        Ken Fyten added a comment - Evgheni, we cannot retroactively change the default behavior of all browsers but FF as it will break backwards behavorial compatibility. To support what the customer wants we will need to create a new configuration that the can invoke that only submits onblur.
        Hide
        Evgheni Sadovoi added a comment - - edited

        In this case an optional configuration parameter should work as well.

        Show
        Evgheni Sadovoi added a comment - - edited In this case an optional configuration parameter should work as well.
        Hide
        Arturo Zambrano added a comment -

        Committed improvement to trunk at revision 32904. Added 'partialSubmitOnBlur' attribute to ice:selectOneMenu, ice:selectManyMenu, ice:selectOneListbox, and ice:selectManyListbox.

        The fix wasn't simple. It required to use combinations of onmouseup, onmousedown, onclick, onfocus, and onblur events to replicate the behaviour of the native onchange event. In the case of multiple selection components, it wasn't just a matter of checking the 'value' property, but it was necessary to go through all the 'option' elements to see which ware selected and which weren't, in order to determine if there was a change.

        Show
        Arturo Zambrano added a comment - Committed improvement to trunk at revision 32904. Added 'partialSubmitOnBlur' attribute to ice:selectOneMenu, ice:selectManyMenu, ice:selectOneListbox, and ice:selectManyListbox. The fix wasn't simple. It required to use combinations of onmouseup, onmousedown, onclick, onfocus, and onblur events to replicate the behaviour of the native onchange event. In the case of multiple selection components, it wasn't just a matter of checking the 'value' property, but it was necessary to go through all the 'option' elements to see which ware selected and which weren't, in order to determine if there was a change.
        Hide
        Cruz Miraback added a comment -

        Confirmed the new attribute 'partialSubmitOnBlur' functions as it should with the following components: ice:selectOneMenu, ice:selectManyMenu, ice:selectOneListbox, and ice:selectManyListbox. Tested in FF17, IE9, and GoogleChrome23 on trunk revision# 32906.

        Show
        Cruz Miraback added a comment - Confirmed the new attribute 'partialSubmitOnBlur' functions as it should with the following components: ice:selectOneMenu, ice:selectManyMenu, ice:selectOneListbox, and ice:selectManyListbox. Tested in FF17, IE9, and GoogleChrome23 on trunk revision# 32906.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Evgheni Sadovoi
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: