Bug Tracker

Modify

Ticket #5916 (closed bug: duplicate)

Opened 3 years ago

Last modified 15 months ago

e.preventDefault doesn't work with live submit

Reported by: rmurphey Owned by: brandon
Priority: major Milestone: 1.4.1
Component: event Version: 1.4
Keywords: Cc:
Blocking: Blocked by:

Description

When a submit handler is bound to a form using .live(), and the submit handler includes e.preventDefault(), the form still submits when the submit event is triggered using .trigger(). When the same submit handler is bound using .bind(), the form is not submitted.

Test case:  http://jsbin.com/arepo/3/edit

Change History

comment:1 Changed 3 years ago by paul.irish

this is a dupe of #5695

comment:2 Changed 3 years ago by rwaldron

Attempted same test above with:

return false;

in place of e.preventDefault();

And produced same results

comment:3 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to duplicate

Paul's cross-referenced this in #5695 so I'll close it as a dupe.

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

View

Add a comment

Modify Ticket

Action
as closed
Author


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

 
Note: See TracTickets for help on using tickets.