Skip to content

Commit ff74511

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

File tree

3 files changed

+6
-34
lines changed

3 files changed

+6
-34
lines changed

src/ng/directive/input.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,16 +1708,13 @@ var inputDirective = ['$browser', '$sniffer', '$filter', '$parse',
17081708
return {
17091709
restrict: 'E',
17101710
require: ['?ngModel'],
1711-
compile: function(tElement, tAttr) {
1712-
if (lowercase(tAttr.type) === 'hidden') tAttr.$set('autocomplete', 'off');
1713-
return {
1714-
pre: function(scope, element, attr, ctrls) {
1715-
if (ctrls[0]) {
1716-
(inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrls[0], $sniffer,
1717-
$browser, $filter, $parse);
1718-
}
1711+
link: {
1712+
pre: function(scope, element, attr, ctrls) {
1713+
if (ctrls[0]) {
1714+
(inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrls[0], $sniffer,
1715+
$browser, $filter, $parse);
17191716
}
1720-
};
1717+
}
17211718
}
17221719
};
17231720
}];

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

Lines changed: 0 additions & 10 deletions
This file was deleted.

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

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)