NetTalk Central

Author Topic: Firefox and number fields  (Read 2950 times)

broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Firefox and number fields
« on: May 04, 2014, 09:23:09 AM »
Hi All,
Loaded the latest (Can't figure out how to see the version yet) of Firefox
In my app now all the number fields have the little up/down arrows on them (see image) and when I enter numbers in some fields they go blank as soon as I leave the field - not all which is even more strange.
Tested in IE and this is not a problem.

I thought it was my code for a while but commented out all the vlaidation so just a plain field.
Just tested a again and if I enter 3 digits in any numbre field they stick soon as I enter the fourth digit they disappear when I leave the field?

I have emailed directly to Bruce as well just in case.

NT 8.10
Win 7 Prof
Firefox (Latest)


Brian.
Brian

broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Re: Firefox and number fields
« Reply #1 on: May 04, 2014, 09:24:05 AM »
Sorry forgot image - here it is

[attachment deleted by admin]
Brian

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: Firefox and number fields
« Reply #2 on: May 04, 2014, 01:08:28 PM »
Hi Brian

This may be because you have defined the field 'Type' as 'Number'.  If you define them as 'String' the 'assists' may go away.

I'm pretty sure I had the same problem a while ago - you are fighting the smarts of the browser. They also can do things like detecting a prompt, say,'200 m' and popping up some useful(!) information like '200 m = 656 ft'.

HTH

Keith

Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Re: Firefox and number fields
« Reply #3 on: May 04, 2014, 01:44:02 PM »
Thanks Keith,

Did a test and sure enough I had them defined as numbers
Changed it to string and they are retaining the numbers.
That type of thing could really bite you.

Thanks again.
Brian

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Firefox and number fields
« Reply #4 on: May 04, 2014, 10:24:19 PM »
The spin-arrows are indeed implemented because the field was set as "number".
You'll find the "boundaries" for the Spin on the Validation tab. (min, max and step.)
I suspect it was clearing only because you'd exceeded the "maximum" as set in the validation.

The way number fields are supported differs a lot from one browser to the next. So overall I'm probably in favor of using the actual SPIN control if you want a spin box, or the String control if you want control over how the number is formatted.

cheers
Bruce