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

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

VotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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. input1.png
          46 kB
          Piotr
        2. input2.png
          45 kB
          Piotr

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment