Skip to content

Commit 4829abc

Browse files
committed
Use polyfill to update model for auto-filled fields (fixes EIS-187)
See: angular/angular.js#1460 https://github.com/tbosch/autofill-event
1 parent 27002b2 commit 4829abc

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

Gruntfile.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ module.exports = function(grunt) {
5252
app: [
5353
'<%= buildDir %>js/angular.js',
5454
'<%= buildDir %>js/angular*.js',
55+
'<%= buildDir %>js/autofill-event.js',
5556
'<%= buildDir %>js/tv4.js',
5657
'<%= buildDir %>js/*.js',
5758
],
@@ -157,6 +158,7 @@ module.exports = function(grunt) {
157158
'bower_components/angular*/angular*.js',
158159
'!bower_components/angular*/angular*.min.js',
159160
'bower_components/ng-file-upload/angular-file-upload.js',
161+
'bower_components/autofill-event/src/autofill-event.js',
160162
'bower_components/tv4/tv4.js',
161163
'js/*.js',
162164
'!js/*.spec.js',
@@ -172,6 +174,7 @@ module.exports = function(grunt) {
172174
build: {
173175
files: {
174176
'<%= buildDir %>js/app.min.js': [
177+
'bower_components/autofill-event/src/autofill-event.js',
175178
'bower_components/tv4/tv4.js',
176179
'<%= buildDir %>js/app.js',
177180
'<%= buildDir %>js/app.templates.js',

bower.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"inuit-ui-list": "^0.2",
3535
"inuit-widths": "^0.1",
3636
"tv4": "^1.0",
37-
"angular-recursion": "^1.0"
37+
"angular-recursion": "^1.0",
38+
"autofill-event": "^1.0"
3839
},
3940
"devDependencies": {
4041
"angular-mocks": "^1.2"

js/app.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,11 @@ angular.module('openeis-ui', [
2424

2525
return '';
2626
};
27+
})
28+
.run(function ($rootScope, $rootElement) {
29+
$rootScope.$on('$viewContentLoaded', function () {
30+
window.setTimeout(function() {
31+
$rootElement.find('input').checkAndTriggerAutoFillEvent();
32+
}, 200);
33+
});
2734
});

0 commit comments

Comments
 (0)