mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
Added favicon resolving to URL input.
Added blur event after entering URL. Focus screen after entering URL.
This commit is contained in:
@@ -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 +')'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user