Hybrid View

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default [FIXED-197] NumberField is broken on iPhone

    [FIXED-197] NumberField is broken on iPhone


    This is a good one. Introduced in v0.93. I can't reproduce this bug in neither Chrome nor Safari, but only on iPhone.
    The Forms example at http://www.sencha.com/deploy/touch/examples/forms/ throws an error when rendering the NumberField in it and doesn't render anything that goes after it. I created a simple page and got the same error:
    HTML Code:
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8" />
        <title>NumberField</title>
        <link rel="stylesheet" type="text/css" href="/touch/resources/css/ext-touch.css" />
        <script type="text/javascript" src="/touch/ext-touch-debug.js"></script>
        <script type="text/javascript">
            Ext.setup({
                onReady: function() {
                    var form = new Ext.form.FormPanel({
                        fullscreen: true,
                        items: [{
                            xtype: 'fieldset',
                            title: 'Number Field',
                            items: [{
                                xtype: 'numberfield'
                            }]
                        }]
                    });
                }
            });
        </script>
    </head>
    <body>
    </body>
    </html>
    The error is:
    JavaScript Error on Line 13488 in ext-touch-debug.js
    TypeError: Result of expression 'item' [null] is not an object.
    Thanks.

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Thank you for the test case, we're taking a look into the problem.

  3. #3
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    There was a fix committed for NumberField right after the .93 build was made public.
    Add this override to see if it covers your issue:

    Code:
    Ext.form.NumberField.override({
    
      maskField : Ext.platform.isIPhoneOS,
    
      renderTpl: [
            '<div <tpl if="id">id="{id}"  </tpl>class="{baseCls} {cls} {cmpCls}<tpl if="ui">  {uiBase}-{ui}</tpl> <tpl  if="label">{labelAlign}</tpl>" <tpl if="style">  style="{style}"</tpl>>',
                '<tpl if="label"><label <tpl  if="fieldEl">for="{inputId}"</tpl>>{label}</label></tpl>',
                '<tpl if="fieldEl"><input id="{inputId}" type="{type}" name="{name}" class="{fieldCls}"',
                    '<tpl if="tabIndex">tabIndex="{tabIndex}" </tpl>',
                    '<tpl if="placeholder">placeholder="{placeholder}" </tpl>',
                    '<tpl if="style">style="{style}" </tpl>',
                    '<tpl if="minValue != undefined">min="{minValue}" </tpl>',
                    '<tpl if="maxValue != undefined">max="{maxValue}" </tpl>',
                    '<tpl if="stepValue != undefined">step="{stepValue}" </tpl>',
                    '<tpl if="autoComplete">autocomplete="{autoComplete}" </tpl>',
                    '<tpl if="autoCapitalize">autocapitalize="{autoCapitalize}" </tpl>',
                '/></tpl>',
                '<tpl if="showClear"><div class="x-field-clear x-hidden-display"></div></tpl>',
                '<tpl if="maskField"><div class="x-field-mask"></div></tpl>',
            '</div>'
        ]
    });
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  4. #4
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default


    Yes, it fixes the issue. Thanks.

  5. #5
    Sencha User
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
    aaugustin is on a distinguished road

      0  

    Default Still broken?

    Still broken?


    I'm in Touch 2 and we changed one of our textfields to a numberfield to make it pull up the number keyboard and it broke it. We've tried commenting out pretty much everything else and that seems to be the problem, any thoughts?

Similar Threads

  1. Replies: 52
    Last Post: 20 Feb 2012, 7:41 AM
  2. [DUPE-197] Numberfield not working as nestedList item in v0.93
    By blessan in forum Sencha Touch 1.x: Bugs
    Replies: 1
    Last Post: 4 Aug 2010, 8:34 AM
  3. [FIXED-99] Rotating iPhone breaks kitchen sink example.
    By DustinHES in forum Sencha Touch 1.x: Bugs
    Replies: 11
    Last Post: 29 Jul 2010, 9:37 AM
  4. Replies: 5
    Last Post: 2 Apr 2009, 12:16 AM
  5. [FIXED] NumberField maybe a bug?
    By drenda81 in forum Ext GWT: Bugs (1.x)
    Replies: 3
    Last Post: 23 Jul 2008, 7:46 PM

Thread Participants: 3