Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 70724e3918 | |||
| 9a0156d258 | |||
| 5730c665e8 | |||
| b8a0ecdd61 | |||
| ed44dd0659 |
+16
-1
@@ -1,9 +1,24 @@
|
||||
<a name="1.2.32"></a>
|
||||
# 1.2.32 alternation-intention (2016-10-10)
|
||||
|
||||
This release reverts the fix in 1.2.31 and provides an alternative fix that doesn't break Angular Material.
|
||||
|
||||
## Reverts
|
||||
|
||||
- **input:** ensure that hidden input values are correct after history back
|
||||
([ed44dd065](https://github.com/angular/angular.js/commit/ed44dd0659f346ced78a112e4a2b30d3af4fd572))
|
||||
|
||||
## Bug Fixes
|
||||
- **$compile:** ensure that hidden input values are correct after history back
|
||||
([b8a0ecdd6](https://github.com/angular/angular.js/commit/b8a0ecdd6189fb111734eb5b6d4d473d0dcf4c36))
|
||||
|
||||
|
||||
<a name="1.2.31"></a>
|
||||
# 1.2.31 barking-moustache (2016-10-10)
|
||||
|
||||
## Bug Fixes
|
||||
- **input:** ensure that hidden input values are correct after history back
|
||||
([7ec663fc](https://github.com/angular/angular.js/commit/7ec663fc708aa7a9a9ce62d2306f24d7a733a86d)
|
||||
([7ec663fc](https://github.com/angular/angular.js/commit/7ec663fc708aa7a9a9ce62d2306f24d7a733a86d))
|
||||
|
||||
|
||||
<a name="1.2.30"></a>
|
||||
|
||||
+11
-1
@@ -1030,13 +1030,17 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
||||
var nodeType = node.nodeType,
|
||||
attrsMap = attrs.$attr,
|
||||
match,
|
||||
nodeName,
|
||||
className;
|
||||
|
||||
switch(nodeType) {
|
||||
case 1: /* Element */
|
||||
|
||||
nodeName = nodeName_(node).toLowerCase();
|
||||
|
||||
// use the node name: <directive>
|
||||
addDirective(directives,
|
||||
directiveNormalize(nodeName_(node).toLowerCase()), 'E', maxPriority, ignoreDirective);
|
||||
directiveNormalize(nodeName), 'E', maxPriority, ignoreDirective);
|
||||
|
||||
// iterate over the attributes
|
||||
for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,
|
||||
@@ -1076,6 +1080,12 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
||||
}
|
||||
}
|
||||
|
||||
if (nodeName === 'input' && node.getAttribute('type') === 'hidden') {
|
||||
// Hidden input elements can have strange behaviour when navigating back to the page
|
||||
// This tells the browser not to try to cache and reinstate previous values
|
||||
node.setAttribute('autocomplete', 'off');
|
||||
}
|
||||
|
||||
// use class as directive
|
||||
className = node.className;
|
||||
if (isString(className) && className !== '') {
|
||||
|
||||
@@ -899,16 +899,11 @@ var inputDirective = ['$browser', '$sniffer', function($browser, $sniffer) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
require: '?ngModel',
|
||||
compile: function(tElement, tAttr) {
|
||||
if (lowercase(tAttr.type) === 'hidden') tAttr.$set('autocomplete', 'off');
|
||||
return {
|
||||
pre: function(scope, element, attr, ctrl) {
|
||||
if (ctrl) {
|
||||
(inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrl, $sniffer,
|
||||
$browser);
|
||||
}
|
||||
}
|
||||
};
|
||||
link: function(scope, element, attr, ctrl) {
|
||||
if (ctrl) {
|
||||
(inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrl, $sniffer,
|
||||
$browser);
|
||||
}
|
||||
}
|
||||
};
|
||||
}];
|
||||
|
||||
+22
-9
@@ -144,16 +144,29 @@ describe('$log', function() {
|
||||
describe('$log.error', function() {
|
||||
var e, $log, errorArgs;
|
||||
|
||||
beforeEach(function() {
|
||||
e = new Error('');
|
||||
e.message = undefined;
|
||||
e.sourceURL = undefined;
|
||||
e.line = undefined;
|
||||
e.stack = undefined;
|
||||
function TestErrorPrototype() {}
|
||||
TestErrorPrototype.prototype = Error.prototype;
|
||||
|
||||
$log = new $LogProvider().$get[1]({console:{error:function() {
|
||||
errorArgs = [].slice.call(arguments, 0);
|
||||
}}});
|
||||
function TestError() {
|
||||
Error.prototype.constructor.apply(this, arguments);
|
||||
this.message = undefined;
|
||||
this.sourceURL = undefined;
|
||||
this.line = undefined;
|
||||
this.stack = undefined;
|
||||
}
|
||||
TestError.prototype = new TestErrorPrototype();
|
||||
TestError.prototype.constructor = TestError;
|
||||
|
||||
beforeEach(function() {
|
||||
e = new TestError('');
|
||||
var mockWindow = {
|
||||
console: {
|
||||
error: function() {
|
||||
errorArgs = [].slice.call(arguments, 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
$log = new $LogProvider().$get[1](mockWindow);
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user