FoxInCloud
Problem with spinners
Gravatar is a globally recognized avatar based on your email address. Problem with spinners
  Vincent H.
  All
  Jul 16, 2019 @ 10:50am

Hi Thierry,

Problem with the spinners: the value entered with the arrows is not preserved at the exit of the screen.

Only a typed value is.

Gravatar is a globally recognized avatar based on your email address. re: Problem with spinners
  FoxInCloud Support - Thierry N.
  Vincent H.
  Jul 17, 2019 @ 02:43am

Hi Vincent,

Looks OK on http://foxincloud.com/tutotest/bs/Event.tuto

(events are in reverse chronological order)

Spinner       pgf.pag1.spn.LostFocus
Spinner       pgf.pag1.spn.RangeHigh(25)
Spinner       pgf.pag1.spn.RangeLow(25)
Spinner       pgf.pag1.spn.Valid(25)
Spinner       pgf.pag1.spn.Click("25")
Spinner       pgf.pag1.spn.MouseUp(1,0,885,78)
Spinner       pgf.pag1.spn.InteractiveChange(25)
Spinner       pgf.pag1.spn.GotFocus
Spinner       pgf.pag1.spn.When
Spinner       pgf.pag1.spn.MouseDown(1,0,885,78)

Spinner       pgf.pag1.spn.LostFocus
Spinner       pgf.pag1.spn.RangeHigh(24)
Spinner       pgf.pag1.spn.RangeLow(24)
Spinner       pgf.pag1.spn.Valid(24)
Spinner       pgf.pag1.spn.InteractiveChange(24)
Spinner       pgf.pag1.spn.GotFocus
Spinner       pgf.pag1.spn.When

Please provide more details and a repro case.

In the browser dev. tools > network pane, can you see the .change() or .input() event fire to the server?

Gravatar is a globally recognized avatar based on your email address. re: Problem with spinners
  Vincent H.
  Vincent H.
  Jul 17, 2019 @ 02:45am

In fact, the value entered with the arrows is not saved if you leave by tabulation.

Moreover, in this case, spinnerhighvalue and spinnerlowvalue are not interpreted either

Gravatar is a globally recognized avatar based on your email address. re: Problem with spinners
  Vincent H.
  FoxInCloud Support - Thierry N.
  Jul 17, 2019 @ 05:51am

Sometimes, controlSource is updated and sometimes not.
In these cases, the change of value (arrow) or lostfocus (TAB) does not generate any event as in the copy of the debug console.

Gravatar is a globally recognized avatar based on your email address. re: Problem with spinners
  Vincent H.
  Vincent H.
  Jul 17, 2019 @ 06:00am

I'm sorry, it's very imprecise but I can not understand the random side of the record of the change in value.

If you have time, the problem can be observed in the "Financement" screen, 3rd tab of dooxi.

Thank you in advance.

Gravatar is a globally recognized avatar based on your email address. re: Problem with spinners
  Vincent H.
  Vincent H.
  Jul 17, 2019 @ 06:41am

Still me, with a little more precision this time, having precisely identified the problem.

When I change the value with the mouse (arrow), without a previous gotfocus, the implemented value is not retained.

If I position myself in the field and then change the value (arrow), controlsource is updated.

Gravatar is a globally recognized avatar based on your email address. re: Problem with spinners
  FoxInCloud Support - Thierry N.
  Vincent H.
  Jul 17, 2019 @ 06:50am

OK please post a video clearly showing the behavior, including the network panel of dev tools filtered on XHR requests

TIA

Gravatar is a globally recognized avatar based on your email address. re: Problem with spinners
  FoxInCloud Support - Thierry N.
  Vincent H.
  Jul 18, 2019 @ 03:05am

Sorry I can't reproduce: when I run your repro scenario, the spinner value goes to the server with a .blur() event, which changes .Value and runs .Valid() on the server.

When I open back the form, the value is what I changed earlier.

Browser: Safari for Mac V 11.0.3 (13604.5.6)

https://youtu.be/SMOciljqPew

Gravatar is a globally recognized avatar based on your email address. re: Problem with spinners
  Vincent H.
  FoxInCloud Support - Thierry N.
  Jul 18, 2019 @ 03:09am

Ok Thierry, it's because you first clicked in the field.
If you click directly on the arrow to implement the value and you quit with the mouse, the new value is not retained

Gravatar is a globally recognized avatar based on your email address. re: Problem with spinners
  FoxInCloud Support - Thierry N.
  Vincent H.
  Jul 18, 2019 @ 03:29am

Depends on the browser: when clicking on the up arrow, Safari automatically focuses the value: https://youtu.be/7hhdEdTkh0Q

If the .click() event fires when clicking the arrows, we could try to force .focus()

Gravatar is a globally recognized avatar based on your email address. re: Problem with spinners
  Vincent H.
  FoxInCloud Support - Thierry N.
  Jul 18, 2019 @ 03:39am

Yes, but when (with Firefox) I click on the arrows, no method is invoked.

Gravatar is a globally recognized avatar based on your email address. re: Problem with spinners
  Vincent H.
  Vincent H.
  Jul 18, 2019 @ 06:04am

No problem either with Chrome that always takes the focus.
This is very annoying because the user thinks he has entered the correct value

Gravatar is a globally recognized avatar based on your email address. re: Problem with spinners
  FoxInCloud Support - Thierry N.
  Vincent H.
  Jul 18, 2019 @ 07:21am

Thanks

I’ll review this soon

Gravatar is a globally recognized avatar based on your email address. re: Problem with spinners
  FoxInCloud Support - Thierry N.
  Vincent H.
  Jul 19, 2019 @ 02:32am

On http://foxincloud.com/tutotest/bs/event.tuto, here are the event sequences for various browsers when clicking the spinner's up arrow without previously focusing into the spinner's "text area", then moving to another control :

Safari, Chrome

Spinner       pgf.pag1.spn.LostFocus
Spinner       pgf.pag1.spn.RangeHigh(1)
Spinner       pgf.pag1.spn.RangeLow(1)
Spinner       pgf.pag1.spn.Valid(1)
Spinner       pgf.pag1.spn.Click("1")
Spinner       pgf.pag1.spn.MouseUp(1,0,884,82)
Spinner       pgf.pag1.spn.InteractiveChange(1)
Spinner       pgf.pag1.spn.GotFocus
Spinner       pgf.pag1.spn.When
Spinner       pgf.pag1.spn.MouseDown(1,0,884,82)

Firefox

Spinner       pgf.pag1.spn.Click("1")
Spinner       pgf.pag1.spn.MouseUp(1,0,888,84)
Spinner       pgf.pag1.spn.InteractiveChange(1)
Spinner       pgf.pag1.spn.MouseDown(1,0,888,84)

After executing this code on FireFox,

jQuery("input[type=number]").mousedown(function(){this.focus()})

I get:

Spinner       pgf.pag1.spn.LostFocus
Spinner       pgf.pag1.spn.RangeHigh(1)
Spinner       pgf.pag1.spn.RangeLow(1)
Spinner       pgf.pag1.spn.Valid(1)
Spinner       pgf.pag1.spn.Click("1")
Spinner       pgf.pag1.spn.MouseUp(1,0,658,262)
Spinner       pgf.pag1.spn.GotFocus
Spinner       pgf.pag1.spn.When && just after .MouseDown() on other browsers
Spinner       pgf.pag1.spn.InteractiveChange(1)
Spinner       pgf.pag1.spn.MouseDown(1,0,658,262)

which is almost the same as other browsers except .When() and .GotFocus() fire AFTER instead of BEFORE .InteractiveChange().

Could you try to add this code to your xxx.js:

jQuery(document).ready(function(){jQuery("input[type=number]").mousedown(function(){this.focus()})});

Hopefully it should fix the issue on FireFox without breaking the other browsers.

Gravatar is a globally recognized avatar based on your email address. re: Problem with spinners
  Vincent H.
  FoxInCloud Support - Thierry N.
  Jul 19, 2019 @ 02:49am

GREAT !

MyControl.MouseDown()  
lparameters nButton, nShift, nXcoord, nYcoord  
IF (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen)  
   RETURN 'jQuery("input[type=number]").mousedown(function(){this.focus()})'  
ENDIF  
RETURN DODEFAULT()  

Many thanks

Gravatar is a globally recognized avatar based on your email address. re: Problem with spinners
  FoxInCloud Support - Thierry N.
  Vincent H.
  Jul 19, 2019 @ 10:37am

Good it it works, however you can just write

Return “this.focus()”
Gravatar is a globally recognized avatar based on your email address. re: Problem with spinners
  Vincent H.
  FoxInCloud Support - Thierry N.
  Jul 19, 2019 @ 11:42pm

Thanks Thierry, it works fine

© 1996-2019