Added favicon resolving to URL input.

Added blur event after entering URL.
Focus screen after entering URL.
This commit is contained in:
Gunther Brunner
2014-07-31 20:30:43 +09:00
parent 8696f833c2
commit 4edcb387d4
15 changed files with 201 additions and 10 deletions

View File

@@ -0,0 +1,19 @@
module.exports = function iconInsideInputDirective() {
return {
restrict: 'A',
link: function (scope, element, attrs) {
// NOTE: this doesn't work on Chrome with auto-fill, known Chrome bug
element.css({
'background-repeat': 'no-repeat',
'background-position': '8px 8px',
'padding-left': '30px'
})
attrs.$observe('iconInsideInput', function(value) {
element.css({
'background-image': 'url(' + value +')'
})
})
}
}
}