Button click event firing when trying to scroll

6 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    1 posts
    Member since:
    Aug 2012

    Posted 28 Aug 2012 Link to this post

    I have a view with multi a tags with a data-role set to "button".  When scrolling through the view, if i first press on a button and try to scroll the page will scroll but then redirect to the next, which I don't want to happen.  How do i make it so that the button redirects only when the button is tapped and won't redirect if I scroll though the view.

    Thanks.
  2. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 29 Aug 2012 Link to this post

    Hi Johnatatn,

    Do you use data-click to bind to the event? Can you reproduce the problem on our demos?

    Greetings,
    Petyo
    the Telerik team
    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. David
    David avatar
    60 posts
    Member since:
    Nov 2012

    Posted 03 May 2013 Link to this post

    I have this issue too you can see it on the mobile demo page here http://demos.kendoui.com/mobile/m/index.html#/mobile/m/buttongroup/index.html. I can produce this issue on my nexus 4 phone, when you are on the 'month' view and the content is scrollable try to start your scroll action (touch and drag) near the 'quarter' button.  If you come into contact with the 'quarter' button the view changes immediately.  This particular case may seem silly (the button is small and in an akward place to being scrolling) but when doing user testing with my app I notice that people inadvertently are clicking my buttons on a page that scrolls and has a button on the page.  It is easier to do this on my app because we have a button that spans the width of the view (well the same width as an inset listview item since it looks nicer that way so most of the view).

    This used to be an issue with links in a listview perhaps the same fix applied there should be applied to buttons in general as well.
  5. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 08 May 2013 Link to this post

    Hello David,

    I am not sure that I understand you correctly. Do you use ButtonGroup (the demo you point to) or a Button widget? If you use the ButtonGroup, you may try the selectOn configuration option.

    Kind regards,
    Petyo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. David
    David avatar
    60 posts
    Member since:
    Nov 2012

    Posted 09 May 2013 Link to this post

    Hi Petyo,
      It happens on both widgets in my case it is with a button, but I was looking for a demo I could reproduce it on so you could see the behavior as well.  I used to see this if you had multiple checkbox inputs in a list view and tried to scroll, it would 'check' whatever box you were over when you started scrolling, the latest version of kendoui fixed this.  I have a jsfiddle that can show you the problem, try to start scrolling over one of the buttons and you will see that the button 'click' event has been executed.
  7. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 14 May 2013 Link to this post

    Hello David,

    Thank you for the clarification. We have addressed the problem in our upcoming release (Q1 SP1) about, to be released later today. Please give that a try.

    Kind regards,
    Petyo
    the Telerik team
    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