⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Unsigned number field bug



saulimus

saulimus
  • profile picture
  • Member

Posted 28 September 2012 - 12:40 PM

I have a column in the database with datatype INT, unsigned.
In edit/add mode, Gcrud creates an input element like this:
<input id="field-testinteger" name="testinteger" type="text" value="51256" class="numeric" maxlength="10) unsigne"/>

The maxlength is all messed up... in my browser (Opera) this makes one unable to use backspace.
The problem probably lies in the model, function get_field_types_basic_table() ...where it tries to find the db_max_length.

web-johnny

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 01 October 2012 - 06:48 AM

Hello [member='saulimus'] ,

Yes I can confirm that this is a bug for all browsers. I will try to fix that for the next version. https://github.com/s...crud/issues/102

Cheers
Johnny

saulimus

saulimus
  • profile picture
  • Member

Posted 02 November 2012 - 08:52 AM

Ok, it seems the problem was a little different.
The "backspace not working in Opera" bug is caused by the jQuery numeric plugin...
It seems it doesn't like Opera much when detecting special keys...
http://www.texotela.co.uk/code/jquery/numeric/

web-johnny

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 03 November 2012 - 09:48 AM

Hmmm, I see. This is already reported at: https://github.com/SamWM/jQuery-Plugins/issues/17 . I don't know perhaps if you just add a comment there that say +1 , yes it would be good to be fixed actually.