What's the reasoning behind stopPropagation for filter widgets?


I was trying to hook onto refinementList item clicks but got stopped by event.stopPropagation in https://github.com/algolia/instantsearch.js/blob/54e226da564069eb5baae886f76f714e07579227/src/components/RefinementList/RefinementList.js#L126

Was wondering what the decision to do this was?


Hi Daniel,

The reason for stopPropagation is mostly for older browsers to prevent double clicks from registering. See also more in the extended comment here:

In theory this likely could go away, but a proper investigation needs to be done to see if it wouldn’t break in an obscure corner case.

If I understood your question correctly from @sylvain.huprelle, you want to do analytics; this is possible with the analytics widget more easily than trying to add event listeners to refinement lists