On generic open lightbox focus the first input or textarea

stable
Jesús Espino 2014-10-02 02:00:36 +02:00
parent 87b5b65812
commit e06e953118
1 changed files with 1 additions and 0 deletions

View File

@ -32,6 +32,7 @@ debounce = @.taiga.debounce
class LightboxService extends taiga.Service class LightboxService extends taiga.Service
open: ($el) -> open: ($el) ->
$el.css('display', 'flex') $el.css('display', 'flex')
$el.find('input,textarea').first().focus()
timeout(70, -> $el.addClass("open")) timeout(70, -> $el.addClass("open"))
docEl = angular.element(document) docEl = angular.element(document)