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.
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?
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
Can't reproduce on http://foxincloud.com/tutotest/bs/Event.tuto
When you leave the pgf.pag1.spn
spinner using the TAB
key, server does execute the .Valid()
, .RangeLow()
and .RangeHigh()
events.
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.
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.
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.
OK please post a video clearly showing the behavior, including the network panel of dev tools filtered on XHR
requests
TIA
Here it is:
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)
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
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()
Yes, but when (with Firefox) I click on the arrows, no method is invoked.
No problem either with Chrome that always takes the focus.
This is very annoying because the user thinks he has entered the correct value
The solution may be to hide the arrows until gotfocus, like this ?
https://stackoverflow.com/questions/32967683/how-to-destroy-jquery-ui-spinner-on-blur
Thanks
I’ll review this soon
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.
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