diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index 4229191a5..813844040 100644 --- a/src/ng/directive/input.js +++ b/src/ng/directive/input.js @@ -1708,16 +1708,13 @@ var inputDirective = ['$browser', '$sniffer', '$filter', '$parse', return { restrict: 'E', require: ['?ngModel'], - compile: function(tElement, tAttr) { - if (lowercase(tAttr.type) === 'hidden') tAttr.$set('autocomplete', 'off'); - return { - pre: function(scope, element, attr, ctrls) { - if (ctrls[0]) { - (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrls[0], $sniffer, - $browser, $filter, $parse); - } + link: { + pre: function(scope, element, attr, ctrls) { + if (ctrls[0]) { + (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrls[0], $sniffer, + $browser, $filter, $parse); } - }; + } } }; }]; diff --git a/test/e2e/fixtures/input-hidden/index.html b/test/e2e/fixtures/input-hidden/index.html deleted file mode 100644 index 881639100..000000000 --- a/test/e2e/fixtures/input-hidden/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - -
- - -
- - - \ No newline at end of file diff --git a/test/e2e/tests/input-hidden.spec.js b/test/e2e/tests/input-hidden.spec.js deleted file mode 100644 index 51af45e43..000000000 --- a/test/e2e/tests/input-hidden.spec.js +++ /dev/null @@ -1,15 +0,0 @@ -describe('hidden thingy', function() { - it('should pass', function() { - - loadFixture('input-hidden'); - expect(element(by.css('input')).getAttribute('value')).toEqual(''); - - element(by.css('button')).click(); - expect(element(by.css('input')).getAttribute('value')).toEqual('{{ 7 * 6 }}'); - - loadFixture('sample'); - browser.driver.executeScript('history.back()'); - var expectedValue = browser.params.browser === 'safari' ? '{{ 7 * 6 }}' : ''; - expect(element(by.css('input')).getAttribute('value')).toEqual(expectedValue); - }); -});