FoxInCloud
Container GotFocus and LostFocus
Gravatar is a globally recognized avatar based on your email address. Container GotFocus and LostFocus
  Paul
  All
  Jul 17, 2019 @ 09:34pm

Hi,

I have found that the GotFocus and LostFocus events are not triggered in FiC on containers.
Is this intentional?

Not a big deal, I will move the code elsewhere.

Paul

Gravatar is a globally recognized avatar based on your email address. re: Container GotFocus and LostFocus
  FoxInCloud Support - Thierry N.
  Paul
  Jul 18, 2019 @ 03:18am

Is this intentional?

Yes, because VFP and HTML behave differently:

  • when tabbing into a VFP container, the container's .gotFocus() fire without physically taking focus (eg. outlined): the focus is immediately transferred to the control with lowest .tabIndex inside the container.
  • conversely in HTML the containing <div> takes focus and you need another TAB to set focus to the control with lowest .tabIndex inside the container, which is pretty misleading.

As FoxInCloud controls the tabbing between controls, we could maybe silently fire the container's .gotFocus() (.focus() in HTML DOM event) and .lostFocus() (.blur() in HTML DOM event) whenever focus crosses the border of a container.

Please feedback whether such an enhancement would bring value to your Web app.

Gravatar is a globally recognized avatar based on your email address. re: Container GotFocus and LostFocus
  Paul
  FoxInCloud Support - Thierry N.
  Jul 18, 2019 @ 02:47pm

I have very little code in this situation, so for me it's not worth the performance hit.
Thanks.

Gravatar is a globally recognized avatar based on your email address. re: Container GotFocus and LostFocus
  FoxInCloud Support - Thierry N.
  Paul
  Jul 19, 2019 @ 02:42am

Please note that, as FoxInCloud sends almost all requests to the server asynchronously, it does not prevent the user's navigation.

© 1996-2019