Announcement

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

    SelectList issues in FF/Chrome

    We are having issues with the following code. In Firefox, the value map gets displayed according to the key whereas in Chrome/IE, the valuemap gets displayed according to the order it was given. I don't know which behaviour is correct, but they should behave the same way, no?

    Code:
    isc.HLayout.create({
    ID :"HL",
    members: [
    (isc.DynamicForm.create({
        width: 500,
        fields: [
            {
             title: "Result",
             type: "select",
             valueMap: {"8":"b b","7":"a a"}
            }
          
        ]
    }))]})

    #2
    We couldn't agree more, unfortunately, as a performance hack Chrome drops the order for numeric keys, even if specified as a String. Hundreds of developers have publicly berated them for this but they so far insist on maintaining the behavior for the small edge it gives in synthetic benchmarks.

    The jury is still out on whether the JavaScript standard will be updated to officially call Chrome's behavior broken, in the meantime, if you need order preserved for numeric keys, you must use an optionDataSource rather than a valueMap.

    Comment


      #3
      I am also finding the same issue in IE9. Firefox is the only browser that behaves that way. Perhaps it is the other way? Eventually firefox will do the same?

      Comment


        #4
        IE6-8, Firefox, Safari and Opera prior to 10 were all consistent, Chrome broke the trend and IE9 followed because there's tremendous attention now on who is faster at (mostly meaningless) synthetic benchmarks.

        It's hard to tell what will be standardized. Obviously, there is information loss if the language drops the ordering for keys, and it's a gotcha that it maintains order for String but not numeric keys. Hopefully the eventual standard will not have this weird mix of behaviors.

        Regardless, you need to use optionDataSource if you want cross-browser order preservation for numeric keys.

        Comment


          #5
          ok. And optionDataSource behaves like listgrid datasource right? As in it does a separate server call for the values?

          Comment


            #6
            Yes, that's correct.

            Comment

            Working...
            X