Uploaded image for project: 'PUBLIC - Liferay Alloy UI'
  1. PUBLIC - Liferay Alloy UI
  2. AUI-1093

Form field validated prematurely due to missing input event (IE7, IE8)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.5.x
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      IE7 & IE8 Document Mode (of IE9)

      Description

      When user starts typing into a text field, it gets validated before the character entered and field value is set. Empty value results in validation failure. This affects IE7 and IE8 document modes of IE9. IE9 mode works fine.

      Having it debugged, I found that form validation had been triggered by a keydown event in IE7, but by a keypress in IE9. The two modes differ in the availability of the input event. (IE Dev Center)

      Form validation is registered by _uiSetValidateOnInput() (in aui-form-validator.js). It calls delegate() in event-delegate.js which checks if Y.Node.DOM_EVENTS contains the specified event. Since input event is not available before IE9, a synthetic event is created and used instead.

      In IE7/8 modes, focusing the text field makes _dispatchEvent (in aui-event-input.js) be bound to keydown, paste, drop and cut events.

        Attachments

          Activity

            People

            Assignee:
            jose.balsas Chema Balsas
            Reporter:
            jozsef.illes József Illés (Inactive)
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              6 years, 26 weeks, 3 days ago

                Packages

                Version Package