Page 1 of 1

Child component override tile click?

Posted: Thu Nov 29, 2018 7:28 pm
by shnar
I have a table on a div with overflow:auto enabled on a Tile that I want when a user clicks on it (say for example clicks on a TH or on the Scrollbar, etc) that it does *not* invoke the Tile click. Is that a possibility?

-shnar

Re: Child component override tile click?

Posted: Thu Nov 29, 2018 7:38 pm
by olton

Code: Select all

$(table).on("click", function(e){
    e.stopPropagation();
})

Re: Child component override tile click?

Posted: Mon Dec 03, 2018 5:03 pm
by shnar
Thanks, worked like a charm. I kind of thought this would be a normal html/javascript question, not a metroui question.

-shnar

Re: Child component override tile click?

Posted: Tue Jan 22, 2019 6:46 pm
by shnar
Just for future reference, the event I needed to stopPropagation in was the mousedown event, not the click event.

-shnar