Software Archive
Read-only legacy content
17061 Discussions

DIV inside li (List item) keep disappearing if I change format

Nick_F_2
New Contributor III
463 Views

When I put a DIV inside and <li></li> in XDK it works until I change the style then the divs are removed and replaced with plain <P></P> tags and the form elements are removed.


As far as I know DIV's are allowed inside a List Item

Here is my Code

<ul data-role="listview" data-inset="true">
                            <li class="widget uib_w_45" data-uib="jquery_mobile/listitem" data-ver="0">
                                <h2>List Item 1</h2>
                                <p> <div class="table-thing with-label widget uib_w_19 InputWidth LabelText InputText" data-uib="jquery_mobile/input" data-ver="0">
                                        <label class="narrow-control label-top-left" for="div1">Div 1</label>
                                        <input class="wide-control" type="number" data-mini="true" value="0" name="div1" id="div1">
                                    </div>
                                </p>
                                <p><div class="table-thing with-label widget uib_w_13 InputWidth LabelText InputText" data-uib="jquery_mobile/input" data-ver="0">
                                        <label class="narrow-control label-top-left" for="div2">Div 2</label>
                                        <input class="wide-control" type="number" data-mini="true" value="0" name="div2" id="div2">
                                    </div></p>
                            </li>
</ul>

As an option click divider in the Designer for the List Item and the code changes to
 

<ul data-role="listview" data-inset="true">
                            <li class="widget uib_w_45" data-uib="jquery_mobile/listitem" data-ver="0" data-role="list-divider">
                                <h2>List Item 1                                                                                               </h2>
                                <p></p>
                            </li>
                        </ul> 


 

 

0 Kudos
1 Reply
Chris_P_Intel
Employee
463 Views

Looks like a bug. The list item may be overdetermining its content.  Though, with jQueryMobile that is hard to say. 

I'll log it.  In the interim, the best solution is to avoid opening the list item in App Designer for edit. You can avoid clicking on it.  Or you can remove the data-uib property from the list item in question and then AD won't touch it.

 

0 Kudos
Reply