Browse Source

Form can`t submitted with input[name=disabled] fix #1473

Robin Herbots 9 years ago
parent
commit
c018083f44
2 changed files with 7 additions and 1 deletions
  1. 6 0
      CHANGELOG.md
  2. 1 1
      js/inputmask.js

+ 6 - 0
CHANGELOG.md

@@ -1,6 +1,12 @@
 # Change Log
 # Change Log
 All notable changes to this project will be documented in this file.
 All notable changes to this project will be documented in this file.
 
 
+## [UNRELEASED]
+### Added
+### Updates
+### Fixed
+- Form can`t submitted with input[name=disabled] #1473
+
 ## [3.3.4 - 2016-12-22]
 ## [3.3.4 - 2016-12-22]
 ### Added
 ### Added
 - extra extension points: analyseMask
 - extra extension points: analyseMask

+ 1 - 1
js/inputmask.js

@@ -2046,7 +2046,7 @@
 						var imOpts = $.data(this, "_inputmask_opts");
 						var imOpts = $.data(this, "_inputmask_opts");
 						if (imOpts) (new Inputmask(imOpts)).mask(this);
 						if (imOpts) (new Inputmask(imOpts)).mask(this);
 						else EventRuler.off(this);
 						else EventRuler.off(this);
-					} else if (e.type !== "setvalue" && (this.disabled || (this.readOnly && !(e.type === "keydown" && (e.ctrlKey && e.keyCode === 67) || (opts.tabThrough === false && e.keyCode === Inputmask.keyCode.TAB))))) {
+					} else if (e.type !== "setvalue" && this.nodeName !== "FORM" && (this.disabled || (this.readOnly && !(e.type === "keydown" && (e.ctrlKey && e.keyCode === 67) || (opts.tabThrough === false && e.keyCode === Inputmask.keyCode.TAB))))) {
 						e.preventDefault();
 						e.preventDefault();
 					} else {
 					} else {
 						switch (e.type) {
 						switch (e.type) {