FoxInCloud
control.SetFocus
Gravatar is a globally recognized avatar based on your email address. control.SetFocus
  Paul
  All
  Oct 15, 2019 @ 10:09pm

Hi Thierry,

I hope all is going well for you.
I am about to investigate why control focus behaviour in web mode is not the same as it is in lan mode and I have some initial questions so I know what to expect :

  1. is control.SetFocus supported in web mode? (I think yes)
  2. is control.Valid returning 0 or .F. supported in web mode, i.e. the focus should not change in the browser ?

Thanks
Paul

Gravatar is a globally recognized avatar based on your email address. re: control.SetFocus
  FoxInCloud Support - Thierry N.
  Paul
  Oct 16, 2019 @ 10:02am

Paul,

Yes to both questions

Gravatar is a globally recognized avatar based on your email address. re: control.SetFocus
  Paul
  FoxInCloud Support - Thierry N.
  Nov 10, 2019 @ 11:38pm

Hi,

I am investigating some controls focus problems and here is an example of the tab order not being obeyed :

In this example the focus should go from textbox1 to textbox2 as that is the tab order in VFP and that is how it works in desktop mode. But in web mode it instead goes from 1 to 3 (the button bottom-right, which actually has the highest tab order, 11 !).

The problem seems to be related to the fact the textbox2 is inside a container, which I have drawn in red; the container is a separate class from a class library.
In desktop mode textbox2 has TabIndex = 1 inside the container and the container itself has TabIndex = 2 on the form; this works in desktop mode but not in web.

In the HTML, textbox1 has TabIndex = 1, the container does not have a TabIndex and textbox2 has TabIndex = 3 - this would seem to be ok, but the focus always goes from textbox1 to the highest TabIndex (the button bottom right).
As an experiment I placed a textbox outside of the container with TabIndex = 2 and this works fine in web mode, focus goes from 1 to 2.
I have tested with Firefox and Chrome.

So, it seems that the container upsets the tab order?

Paul

Gravatar is a globally recognized avatar based on your email address. re: control.SetFocus
  FoxInCloud Support - Thierry N.
  Paul
  Nov 11, 2019 @ 10:07am

Hi Paul,

FoxInCloud (HTMLtabIndex*() in awHTML.prg) collects the .tabIndex across containers recursively and, while the tabindex attribute is 'flat' in HTML (ignoring containership), FoxInCloud clones the VFP behaviour by adjusting the generated HTML .tabIndex with respect to where controls are contained.

eg. http://foxincloud.com/tutotest/bs/Modal.tuto (MODIFY FORM home(1) + "tools\ab\aw\samples\fic\fictuto\progs\forms\modal.scx") works fine with several containers.

To find the reason why it does not behave OK in your case, please share a screenshot of your VFP form with 'view > tab order > assign interactively', and the corresponding generated HTML code.

Thanks in advance,

© 1996-2019