jquery - Click event not fired on button with svg element in Safari -


in safari click event not fired on button svg element. when click on buttons edge click event fires, if click on svg element not.

$(document).on('click', 'button', function(e) {     console.log(e); }); 

it works if attach click event this:

$('button').on('click', function(e) {     console.log(e); }); 

because of buttons added dynamically can't this;

example in codepen.io http://codepen.io/neilhem/pen/bdgypq

jquery version 2.1.3

i don't know best way solve problem, adding pointer-events: none; svg element solved problem.

svg.icon {   pointer-events: none; } 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -