List View and Drawer issues

4 posts, 0 answers
  1. George
    George avatar
    2 posts
    Member since:
    Oct 2013

    Posted 08 Oct 2013 Link to this post

    I have a listview being populated by some json data. I have the elements in the listview linking to a details page. All is working fine.
    when i add drawers to the page thats when it breaks. when i swipe it thinks im clicking so it tries to open the drawer and the details view at the same time making for some interesting behaviour.

    how can i combat this?



    <!--LISTVIEW DATA--> 
    <script id="alertlist" type="text/x-kendo-template">
          <a class="details-link" data-role="listview-link" href="\#details?alert_ID=#=alert_ID#">
            <img class="alertimage" src="/images/#: degree #.png" />
          </a>
          <div class="listviewdiv">
            <h3 class="item-info">#: title #</h3>
            <p class="item-title">#: sentDT # <span class="AlertTitle"> :: #: sender # </span></p>       
          </div>
          <a data-role="button" href="\#details?alert_ID=#=alert_ID#" class="listviewbutton" data-icon="mostrecent"></a>    
      </script>


    <ul id="alert-list-scroll" data-role="listview" data-source="IRISalerts" data-click="listViewClick"  data-template="alertlist"></ul>
  2. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 10 Oct 2013 Link to this post

    Hi George,

    indeed the behavior in this case is interesting. We are still pondering on an the best way to handle it. The two widgets in fact exhibit somewhat contradicting behavior: 

    - The iOS tableview navigates when tapped or swiped (as long as you swipe across one item). You can check this in the iOS settings screen, for instance.
    - The drawer also handles the swipe event. 

    Neither widget can claim rights over the swipe gesture; If the listview handles it, the drawer will not open on swipe. If the drawer handles it, the listview (and several other widgets) will suffer from reduced usability, as they will be affected only by precise taps. 

    In our next release, the drawer will feature a new configuration option - swipeToOpen. If set to false, the drawer will not open on swipe, yielding somewhat better behavior than the current.

    In case you have any suggestions about the correct way to handle it, do not hesitate to share them with us. 

    Regards,
    Petyo
    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. George
    George avatar
    2 posts
    Member since:
    Oct 2013

    Posted 10 Oct 2013 Link to this post

    thanks for the reply!
    Is there any way to have the listview only link to the details view on tap? Im not really swiping to get to the details view but im swiping to open the drawer but when i swipe it just so happens my finger is over an <a> tag. 

    Also, this is on Android.

    To put it another way, on your examples. I can scroll down a list view all day long but action doesn't happen until i tap on an item...
  5. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 11 Oct 2013 Link to this post

    Hi George,

    Vertical scrolling is a special case, indeed. it is handled by the scroller widget, which captures the events in order to prevent the containing widgets from registering it as a tap.  

    Configuring the listview to accept taps only sounds like a viable approach, however it is not currently exposed as a configuration option. I will log this idea as an enhancement for our next major release. Thank you once again for the feedback. 

    Regards,
    Petyo
    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