ListView with comment and >

4 posts, 0 answers
  1. Jason
    Jason avatar
    4 posts
    Member since:
    Dec 2013

    Posted 26 Feb 2014 Link to this post

    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.
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2566 posts

    Posted 27 Feb 2014 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Jason
    Jason avatar
    4 posts
    Member since:
    Dec 2013

    Posted 27 Feb 2014 in reply to Kiril Nikolov Link to this post

    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
  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2566 posts

    Posted 28 Feb 2014 Link to this post

    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!
Back to Top
Kendo UI is VS 2017 Ready