Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove focus programmatically?

I have a jquery ui dialog with tabs loaded dynamically/JSON with content. Due to the complexity, I can't really post a fiddle or a relevant code (too much code).

What's happening is that when the dialog opens, you can tab through the elements within the dialog, up to the first tab. After that, you cannot tab through to anywhere else. The focus is locked on that tab, even if you click elsewhere, that focus is locked on that tab.

I am unable to locate the actual cause of this issue.

So, how would I remove the focus programmatically?

like image 723
Jason Avatar asked Oct 31 '11 13:10

Jason


People also ask

How do you remove focus from an element?

The blur() method removes focus from an element.

How do you clear focus in WPF?

Either use the LostKeyboardFocus event or shift focus to another element (which shifts logical focus along with it) before clearing keyboard focus.


1 Answers

This might help...

http://api.jquery.com/blur/

$('#tabName').blur(); 
like image 98
Derek Avatar answered Sep 20 '22 02:09

Derek