anchor button fires twice

2 posts, 0 answers
  1. Hamad
    Hamad avatar
    2 posts
    Member since:
    Sep 2013

    Posted 07 Oct 2013 Link to this post

    anchor button click fires twice, here is my code

    1.<div data-role="view" id="drawer-company" data-layout="drawer-layout" data-title="Company">
    2.    <header data-role="header">
    3.        <div data-role="navbar">
    4.            <a data-role="button" data-align="right" data-click="UpdateCompanyDetails_Click">Update</a>
    5.        </div>
    6.    </header>

    1.function UpdateCompanyDetails_Click(e) {
    2.    e.preventDefault();
    3.    alert("Updated");
    4.    return false;
  2. Kiril Nikolov
    Kiril Nikolov avatar
    2596 posts

    Posted 08 Oct 2013 Link to this post

    Hi Hamad,

    I have tested this on a iOS and Android devices and it does not seem to be fired twice. I guess that you are testing this code in Internet Explorer where the alert is fired twice, but this is caused by a specific functionality in the browser and it is valid only for alerts or dialog boxes. Test it with console.log() for example to see the difference.
    Kiril Nikolov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top