Page 1 of 1

TIWCGJQCheckBoxList lost focus after close

PostPosted: 29 Sep 2014 18:20
by kattunga
Hi I'm having a problem with TIWCGJQCheckBoxList.
I have a dialog where I move between components using the tab key, one of this components is a TIWCGJQCheckBoxList.
The problem is that when I close the popup list items using the mouse or the Esc key, the component lost focus and I can't continue navigating using the tab key.
I try to force the focus to the field using javascript in the OnClose event ( function (e) {$(<#myobjectname#>).focus();} ) but it does't work.

Is there any solution to this problem?

regards

Re: TIWCGJQCheckBoxList lost focus after close with Esc key

PostPosted: 29 Sep 2014 18:54
by Jorge Sousa
Hello

Please use SetFocusOnElement

function (e) { SetFocusOnElement($(<#myobjectname#>); } )

it introduces a setTimeout to execute after a while

Re: TIWCGJQCheckBoxList lost focus after close with Esc key

PostPosted: 29 Sep 2014 19:28
by kattunga
I try:

JQCheckBoxListOptions.OnClose.Script := 'function (){SetFocusOnElement($(<#myobjectname#>));}';

but it still not work, after closing the popup with keyboard or mouse the component lost focus.

Re: TIWCGJQCheckBoxList lost focus after close

PostPosted: 29 Sep 2014 21:29
by Jorge Sousa
Hi

Do you have the same issue in a simple project?

Re: TIWCGJQCheckBoxList lost focus after close

PostPosted: 29 Sep 2014 23:51
by kattunga
Yes, you can test it with the attached simple project.
a) Focus first edit box
b) tab to checklist
c) open lookup (with Enter or Mouse)
d) Close look up (with Esc or Mouse)
e) Focus is lost, if you press Tab or Shift+Tab wrong component is focused.

Re: TIWCGJQCheckBoxList lost focus after close

PostPosted: 30 Sep 2014 18:01
by Alexander Bulei
Hi kattunga ,

Added/Fixed in next build:

Code: Select all
v2.3.0.52:

JQCheckBoxList:
- Added: new FocusOnClose property - focus the element after popup close.


Thanks.

Best Regards.