ICEfaces
  1. ICEfaces
  2. ICE-7665

ace:maskedEntry: AjaxListener being triggered twice in IE7/8

    Details

      Description

      The ajaxListener is being called twice, and the values on the page are being incremented twice as well. The expected / actual results are below:

      Expected message = "AjaxBehaviorEvent received! (#1)", Actual message = AjaxBehaviorEvent received! (#2)
      Expected value A = 1, Actual value = 2
      Expected value B = 1, Actual value = 2

      To reproduce:
      1. Build / deploy test application from location above
      2. Navigate to MaskedEntry Ajax test
      3. Use the app to test each of these scenarios that are producing the wrong results:
      "valueChange" Event Test
      Default Event Test
      "valueChange" Event Test w/ ValueChangeListener attribute

        Activity

        Cruz Miraback created issue -
        Cruz Miraback made changes -
        Field Original Value New Value
        Summary ace:maskedEntry: AjaxListener being triggered twice in IE ace:maskedEntry: AjaxListener being triggered twice in IE7/8
        Salesforce Case []
        Cruz Miraback made changes -
        Salesforce Case []
        Security Private [ 10001 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 3.0 [ 10241 ]
        Assignee Priority P1
        Affects Version/s 3.0.RC2 [ 10313 ]
        Assignee yip.ng [ yip.ng ]
        Hide
        yip.ng added a comment - - edited

        Traced code. "valueChange" is being bound as "change" event in jQuery. No double binding of listener.

        Known issue. See, for example, http://stackoverflow.com/questions/7008527/jquery-onchange-event-fires-twice-in-ie8.

        Some suggestions. None of them look simple, generic and cross-browser safe. Further, Grimlock wrapper JS looks very trivial. All the complicated stuff is in the third-party masked input plugin. Need deeper understanding of plugin first.

        Show
        yip.ng added a comment - - edited Traced code. "valueChange" is being bound as "change" event in jQuery. No double binding of listener. Known issue. See, for example, http://stackoverflow.com/questions/7008527/jquery-onchange-event-fires-twice-in-ie8 . Some suggestions. None of them look simple, generic and cross-browser safe. Further, Grimlock wrapper JS looks very trivial. All the complicated stuff is in the third-party masked input plugin. Need deeper understanding of plugin first.
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 3.0.1 [ 10282 ]
        Fix Version/s 3.0 [ 10241 ]
        Assignee Priority P1 P3
        Ken Fyten made changes -
        Salesforce Case []
        Security Private [ 10001 ]
        yip.ng made changes -
        Attachment screenshot-1.png [ 14151 ]
        yip.ng made changes -
        Attachment screenshot-2.png [ 14152 ]
        yip.ng made changes -
        Attachment screenshot-2.png [ 14152 ]
        yip.ng made changes -
        Attachment screenshot-2.png [ 14153 ]
        Hide
        yip.ng added a comment - - edited

        Cause: bug in jQuery that fires extra change events on the IE beforedeactivate event. See screenshot-1.png. (This may be general to all input elements, not just specific to masked input. I have seen mention of select and checkbox elements as well on the web.)

        Fixed in jQuery 1.7. See screenshot-2.png and jQuery 1.7 release notes: http://blog.jquery.com/2011/11/03/jquery-1-7-released/#comment-528188.

        We have jQuery 1.6.2. May not be easy to just figure out and transplant the relevant changes because of the "complete rewrite of the events system" in jQuery 1.7. (There are 866 differences between the 2 versions.)

        Show
        yip.ng added a comment - - edited Cause: bug in jQuery that fires extra change events on the IE beforedeactivate event. See screenshot-1.png. (This may be general to all input elements, not just specific to masked input. I have seen mention of select and checkbox elements as well on the web.) Fixed in jQuery 1.7. See screenshot-2.png and jQuery 1.7 release notes: http://blog.jquery.com/2011/11/03/jquery-1-7-released/#comment-528188 . We have jQuery 1.6.2. May not be easy to just figure out and transplant the relevant changes because of the "complete rewrite of the events system" in jQuery 1.7. (There are 866 differences between the 2 versions.)
        Hide
        yip.ng added a comment -

        jQuery will be upgraded in ICE-7895.

        Show
        yip.ng added a comment - jQuery will be upgraded in ICE-7895 .
        yip.ng made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]
        Ken Fyten made changes -
        Fix Version/s EE-3.0.0.GA [ 10262 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P3

          People

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

            Dates

            • Created:
              Updated:
              Resolved: