Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit d36b5c2

Browse files
revert:fix(input): ensure that hidden input values are correct after history.back
This reverts commit c49fb56. There was a regression in angular-material that relied upon the input directive having `link.pre` property
1 parent ead094e commit d36b5c2

File tree

3 files changed

+6
-36
lines changed

3 files changed

+6
-36
lines changed

src/ng/directive/input.js

+6-9
Original file line numberDiff line numberDiff line change
@@ -1992,20 +1992,17 @@ var inputDirective = ['$browser', '$sniffer', '$filter', '$parse',
19921992
return {
19931993
restrict: 'E',
19941994
require: ['?ngModel'],
1995-
compile: function(tElement, tAttr) {
1996-
if (lowercase(tAttr.type) === 'hidden') tAttr.$set('autocomplete', 'off');
1997-
return {
1998-
pre: function(scope, element, attr, ctrls) {
1999-
if (ctrls[0]) {
1995+
link: {
1996+
pre: function(scope, element, attr, ctrls) {
1997+
if (ctrls[0]) {
20001998
var type = lowercase(attr.type);
20011999
if ((type === 'range') && !attr.hasOwnProperty('ngInputRange')) {
20022000
type = 'text';
20032001
}
2004-
(inputType[type] || inputType.text)(scope, element, attr, ctrls[0], $sniffer,
2005-
$browser, $filter, $parse);
2006-
}
2002+
(inputType[type] || inputType.text)(scope, element, attr, ctrls[0], $sniffer,
2003+
$browser, $filter, $parse);
20072004
}
2008-
};
2005+
}
20092006
}
20102007
};
20112008
}];

test/e2e/fixtures/input-hidden/index.html

-10
This file was deleted.

test/e2e/tests/input-hidden.spec.js

-17
This file was deleted.

0 commit comments

Comments
 (0)