This is a migrated thread and some comments may be shown as answers.

ListView with comment and >

3 Answers 71 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 27 Feb 2014, 12:15 AM
I have an issue with the ListView where having a comment in between the <li> and <a> tags causes the > not to show up.  For example:

<!-- This works -->
<li>
  <a>Foo</a>
</li>
 
<!-- This doesn't work -->
<li>
  <!-- This comment causes the arrow to not appear -->
  <a>Foo</a>
</li>

It seems like in the 2nd case, the comment should be ignored and the > character should still appear for the list item.

3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 27 Feb 2014, 12:41 PM
Hi Jason,

This behavior is expected. It is caused by the fact that the ListView checks for the first child element and applies the styling, adding a comment there makes the <a> not the only child of the <li> element, and the correct styling is not applied. 

If you put your comment inside the <a> tag then it should work as expected:

<a>Item <!-- This comment works --> </a>

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jason
Top achievements
Rank 1
answered on 27 Feb 2014, 09:59 PM
Hi Kiril,

I presumed that was the case, but I'm suggesting that shouldn't be the behavior. As comments are typically not rendered and ignored by the browser, it's not intuitive that a comment would affect the view. It seems more like a bug, or an edge case that wasn't given much thought. Is this something I should add on the Feedback & Feature Requests page?

Thanks,
Jason
0
Kiril Nikolov
Telerik team
answered on 28 Feb 2014, 08:16 AM
Hi Jason,

Thank you very much for your feedback it is highly appreciated. 

Currently we do not consider this as a bug, as it does not break the core functionality of the widget. But I would like to ask you to submit your observations and suggestions for change in the implementation in the uservoice section, so it will be taken into account and considered for a future build. 

Once again thank you very much for bringing this up!

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView (Mobile)
Asked by
Jason
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Jason
Top achievements
Rank 1
Share this question
or