Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ListGrid masked textfield types backwards?

    Version: SC 8.0 production and the 5/4 nightly
    Browser: Opera 11 (Chrome 11, Firefox 3.6 and IE 8.0 work correctly)

    I have a ListGrid that supports editing (canEdit: true, modalEditing: true). One of the cells is a phone number. The field has a mask defined as ###-###-####. When editing the field, the mask appears correctly but when typing, the number is entered in backwards. For example, when entering the number 123-4567, the field will look like this as each digit is typed:

    ___-___-____
    1__-___-____
    21_-___-____
    321-___-____
    432-1__-____
    543-21_-____
    654-321-____

    and so on.

    Also, cursor and delete keys don't work while in the field. I saw in another forum post a suggestion to use maskOverwriteMode:true. When I tried this, each digit entered merely replaced the first digit, like so:
    1__-___-____
    2__-___-____
    3__-___-____
    etc...

    I have tried defining the phone field in the datasource as both text and integer, with no change in results. Also, the developer console does not show any errors, at least not in the default mode.

    Code:
    isc.RestDataSource.create({
       ID:'dsPhoneDirectory',
       dataFormat: 'json',
       dataURL: '/phoneDirectory.json',
       fields: [
          { name: 'phoneDirectoryId', type:'integer', primaryKey:true},
          { name: 'lastName', type:'text'},
          { name: 'firstName', type:'text'},
          { name: 'phone', type:'integer'}
       ]
    });
    
    isc.ListGrid.create({
       dataSource: dsPhoneDirectory,
       autoFetchData: true,
       autoSaveEdits: true,
       alternateRecordStyles: true,
       width: 400,
       canEdit: true,
       modalEditing: true,
        editEvent: 'doubleClick',
        listEndEditAction: 'next',
        fields:[
            {name:'lastName'},
            {name:'firstName'},
            {name:'extension'},
            {name:'fax', editorProperties: {mask: "###-###-####" } }
        ]
    });
    Removing the mask eliminates the problem but, of course, there is no formatting.

    Any suggestions?

    Thanks in advance,

    Solstice

    #2
    A fix is in place and will be available in the next nightly.

    Comment


      #3
      Thanks, David. After I posted this, I found another oddity with SC and Opera. The RichTextEditor has an issue, only in Opera, where if you select some text in the editor, then click on one of the format buttons (e.g. bold, underline), the text in the editor is not formatted.


      Btw, I've been checking out your blog at http://smartclientexperience.wordpress.com. Some great stuff there!

      Comment


        #4
        The fix is related to grabbing the selection and may take care of the RTE is well. Please let us know.

        Comment


          #5
          Will do!

          Thanks

          Comment


            #6
            That fixed it! It also took care of the problem where the length property was being ignored when a mask was being used.

            Thanks!

            Comment

            Working...
            X