Bug #1099

Number of shirts

Added by Tezza . over 4 years ago. Updated over 4 years ago.

Status:Closed Start date:03/13/2012
Priority:Low Due date:
Assignee:David Raison % Done:

100%

Category:-
Target version:2.1 - Version 2012+
Resolution:

Description

If you input a big number (>4 chars) Chrome chrashes because it has to create that amount of input fields

Screen Shot 2012-03-13 at 23.23.58.png (65.3 kB) Tezza ., 03/13/2012 11:30 pm

Associated revisions

Revision a8e72b37
Added by David Raison over 4 years ago

changed amount onkeyup, oninput and onblur events, sort of fixes #1099

Revision c1995643
Added by David Raison over 4 years ago

changed amount onkeyup, oninput and onblur events, sort of fixes #1099

History

#1 Updated by David Raison over 4 years ago

  • Target version set to 2.0 - Version 2012

#2 Updated by David Raison over 4 years ago

  • Status changed from New to In Progress
  • Priority changed from Normal to Low
  • % Done changed from 0 to 50

This has been fixed now.
The only problem is that we cannot account for chrome's number incrementors.
Trying to tie both onkeyup() and onclick() handlers didn't work out so far.

See http://api.jquery.com/keyup/ and http://api.jquery.com/click/

#3 Updated by Jeff Wagner over 4 years ago

What about using a select box? Because onkeyup() may not work on touchscreens and it would also be much cleaner in my opinion.

#4 Updated by David Raison over 4 years ago

The html input type="number" field does not have a maxlength property. Test here:

See http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_maxlength

However, using the max and min properties, we can force browser to enforce that, at least those with html5 support.
Currently, we have added javascript to additonally control the number of shirts added, but we might actually consider dropping that.

We should also consider adding or even replacing onkeyup and onclick by "oninput" which works perfectly and instantly with chrome's de- and incrementors.
But see

#5 Updated by David Raison over 4 years ago

Jeff Wagner wrote:

What about using a select box? Because onkeyup() may not work on touchscreens and it would also be much cleaner in my opinion.

That would also be an option, yes.

#6 Updated by David Raison over 4 years ago

  • Target version changed from 2.0 - Version 2012 to 2.1 - Version 2012+

#7 Updated by David Raison over 4 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 50 to 100

#8 Updated by David Raison over 4 years ago

  • Assignee set to David Raison

#9 Updated by Jeff Wagner over 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF