Bug Tracker

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#13817 closed bug (notabug)

keypress on input text fire click on the first button or input[type=submit]

Reported by: prometee Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

You can found an example here : http://jsfiddle.net/Prometee/BZwEe/6/

When you hit enter in the input text a click is fired (perhaps by the navigator) on the button.

If you remove the button element this code works as expected.

Change History (4)

comment:1 Changed 6 years ago by scottgonzalez

Resolution: notabug
Status: newclosed

That's how forms work. This is unrelated to jQuery.

comment:2 Changed 6 years ago by prometee

So the browsers are responsible...

comment:3 Changed 6 years ago by scottgonzalez

Yes, and this will never change. This is intended behavior to make implicit form submission work.

comment:4 Changed 6 years ago by prometee

Ok but I don't understand why a simple button is clicked while logically only input[type=submit] should submit a form.

But ok this is a general behavior...

Note: See TracTickets for help on using tickets.