Problem focusing an element on jamine test.

459 views
Skip to first unread message

Carles

unread,
Dec 18, 2012, 7:42:15 AM12/18/12
to ang...@googlegroups.com
Hi guys 

I trying to test an directive that needs to be focused in order to work but for some reason I can´t focus on jasmine. 
Here is a fiddle example of my problem http://jsfiddle.net/carpasse/3eHjg/17/

Does anybody know how to make this test pass???

Thanks a lot in advance.

Regards, Carles

Peter Bacon Darwin

unread,
Dec 18, 2012, 4:19:15 PM12/18/12
to ang...@googlegroups.com
Just a guess: Perhaps you need to have the input attached to the DOM so that it is visible before trying to focus it?


--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en-US.
 
 

Carles

unread,
Dec 18, 2012, 5:52:38 PM12/18/12
to ang...@googlegroups.com
Thanks Peter.

That solved the problem :D

Reply all
Reply to author
Forward
0 new messages