Tapestry
  1. Tapestry
  2. TAPESTRY-1141

Async form fails if keyboard is used to trigger the submit...

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.1.1
    • Component/s: Framework, JavaScript
    • Labels:
      None
    • Environment:
      FF1.5.0.7

      Description

      An example:
      <form jwcid="@Form" async="ognl:true" listener="listener:doEmail"
      updateComponents="testme">
      <input jwcid="@TextField" value="ognl:email"/>
      <input jwcid="@Submit" value="SEND"/>
      </form>

      Pressing ENTER submits correctly the first time. However, pressing ENTER again results in
      [TypeError: this.forms[formId] has no properties, file: http://127.0.0.1:8080/assets/static/dojo/dojo.js, line: 419] when calling overrideSubmit$joinpoint$method on [object Object] with arguments [object Object]
      FATAL exception raised: this.forms[formId] has no properties
      and no ajax request is made.

      Finally, if one changes the textfield value and submits again using ENTER, it will work.

      So, the problem occurs when submiting with keyboard an already submitted form that hasn't changed its values.

        Activity

        Hide
        Andreas Andreou added a comment -

        IE 6, Konqueror, Opera all work... so this looks to be FF specific.

        At first i thought this to relate to how browsers treat the enter key
        ( http://ppewww.ph.gla.ac.uk/~flavell/www/formquestion.html )
        but the fact that it works when the value of the textfield has changed
        dismisses this.

        The error "this.forms[formId] has no properties" is due the value of formId
        Instead of having the id of the form, in this case it contains the id of the textfield.

        Show
        Andreas Andreou added a comment - IE 6, Konqueror, Opera all work... so this looks to be FF specific. At first i thought this to relate to how browsers treat the enter key ( http://ppewww.ph.gla.ac.uk/~flavell/www/formquestion.html ) but the fact that it works when the value of the textfield has changed dismisses this. The error "this.forms [formId] has no properties" is due the value of formId Instead of having the id of the form, in this case it contains the id of the textfield.
        Hide
        Andreas Andreou added a comment -

        Fixed... in the case described, FF considers the textfield to be the target of the generated event (instead of the form)

        Show
        Andreas Andreou added a comment - Fixed... in the case described, FF considers the textfield to be the target of the generated event (instead of the form)
        Hide
        Jesse Kuhnert added a comment -

        Am assuming fixed.

        Show
        Jesse Kuhnert added a comment - Am assuming fixed.

          People

          • Assignee:
            Andreas Andreou
            Reporter:
            Andreas Andreou
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development