Bug Tracker


Opened 5 years ago

Closed 5 years ago

#10701 closed bug (fixed)

Problems with submit forms using submit function

Reported by: anonymous Owned by: dmethvin
Priority: low Milestone: 1.7.1
Component: event Version: 1.7
Keywords: Cc:
Blocked by: Blocking:


On 1.7 form is posting even if onsubmit returns false. In 1.6.4 everithing was working good.

You can test it here: http://jsfiddle.net/cxSmk/1/

When you click on "Submit" using 1.7 it will ask you to download bin file.

Firefox 7.0.1

Change History (4)

comment:1 Changed 5 years ago by timmywil

  • Component changed from unfiled to event
  • Priority changed from undecided to low
  • Resolution set to invalid
  • Status changed from new to closed

"return false" only works if you use jQuery to bind the handlers.


comment:2 Changed 5 years ago by dmethvin

  • Resolution invalid deleted
  • Status changed from closed to reopened

Yeah it just needs an extra check in .trigger().

The reason this got through, however, is that we consider inline handlers a wontfix item and don't have any unit tests for them. I will fix it but also point out that inline handlers do not always work reliably in jQuery because they're not under our control.

comment:3 Changed 5 years ago by dmethvin

  • Milestone changed from None to 1.7.1
  • Owner set to dmethvin
  • Status changed from reopened to assigned

comment:4 Changed 5 years ago by Dave Methvin

  • Resolution set to fixed
  • Status changed from assigned to closed

Fix #10701, .preventDefault if an inline handler returns false.

Baby unicorns are slapped each time you use inline handlers, so do it sparingly.

Changeset: 90c907e8b65bc9d323863fc57389f2dca611292d

Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Modify Ticket

Change Properties

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.