Skip to content

Commit

Permalink
fix: pressing enter submits the form
Browse files Browse the repository at this point in the history
  • Loading branch information
ahgentil committed Mar 5, 2018
1 parent 66b36ca commit 8bea147
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/services/gesture/gesture.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,10 @@ function attachToDocument( $mdGesture, $$MdGestureHandler ) {

function clickHijacker(ev) {
var isKeyClick = ev.clientX === 0 && ev.clientY === 0;
var isSubmitEvent = ev.target && ev.target.type === 'submit';
if (!isKeyClick && !ev.$material && !ev.isIonicTap
&& !isInputEventFromLabelClick(ev)) {
&& !isInputEventFromLabelClick(ev)
&& !isSubmitEvent) {
ev.preventDefault();
ev.stopPropagation();
lastLabelClickPos = null;
Expand Down

0 comments on commit 8bea147

Please sign in to comment.