Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1810
Sometimes item click won't fire in Firefox
posted

Hi,

I observed a strange behaviour when testing webdatamenu under Firefox 14.0.1, sometimes client itemclick won't fire. 

After playing a bit with this behaviour it seems that, if the first time you click the item (let`s say Nodo1.1 in the sample), clicking on the item while moving the mouse, as if it were a tiny drag caused by the speed or hurry of the user. After that, item click won't fire. It does not seem to happen on IE. I know that it sounds strange but it is more normal than it seems.

I am using the last service release (12.1.20121.2048).

Any hints?

Sample:

<script>
function nodeclick() {
alert("click");
}
</script>

<ig:WebDataMenu ID="WebDataMenu1" runat="server">
<ClientEvents ItemClick="nodeclick" />
<Items>
<ig:DataMenuItem Text="Nodo1">
<Items>
<ig:DataMenuItem Text="Nodo1.1">
</ig:DataMenuItem>
</Items>
</ig:DataMenuItem>
</Items>
</ig:WebDataMenu>

Thanks.

Parents
No Data
Reply
  • 37874
    posted

    Hello rickycl,

    This is caused by the browser. If you test this under different browsers you will observe the same behavior - when there is  dragging with the mouse button down the click event is not fired. Maybe just the time for dragging required to cancel the click event is slightly different for each browser. However you could instead handle the mousedown event for all node elements, for example using jQuery:

    $('#WebDataMenu1 li').mousedown(function () {
        alert("click");
    });

    Let me know if this helps.

Children