Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13811

jquery-mobile styles lost, when appending <input> with jquery

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • cordova-android-7.0.0
    • None
    • cordova-android

    Description

      Not sure, if this should be considered a bug; it seems unlikely, that nobody has encountered it..

      When <input> fields are added with jquery after 'onDeviceReady' in 'index.js' jquery mobile styles are lost.

      minimal example:

      index.html:

      ...

      <div id="myone" class="ui-field-contain">

      </div>

      ...

      index.js:

      ...

      onDeviceReady: function()

      {     $("#myone").append("<input type='text' data-clear-btn='true'>"); }

      , ...

      see input2.png

      If the <input> fields are added before 'onDeviceReady' they are styled appropriately.

      see input1.png

       

      This is akward and I couldn't find any workaround. Does cordova style <input>s in a special way? Some solution would be highly appreciated!

      Attachments

        1. input2.png
          45 kB
          Piotr
        2. input1.png
          46 kB
          Piotr

        Activity

          People

            bowserj Joey Robert Bowser
            piotr Piotr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: