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,20 @@
module.exports = function blurElementDirective($parse, $timeout) {
return {
restrict: 'A',
link: function (scope, element, attrs) {
var model = $parse(attrs.blurElement)
scope.$watch(model, function (value) {
if (value === true) {
$timeout(function () {
element[0].blur()
})
}
})
element.bind('blur', function () {
scope.$apply(model.assign(scope, false))
})
}
}
}