Reactjs event handler not triggered for element in a container which prevent event bubbling -


i'm using react map library, use react render elements in container provided map library.

the problem container prevent event bubbling, checkout reactjs source code found event emitter listen on html document , depend on event bubbling dispatch event.

how can make onclick handler work? addeventlistener manually don't think elegant way.

<body>   <container preventbubbling>     <reactelement onclick={this.handleclick}/>   </container> </body> 

as said, react depends on event bubbling instead of attaching event handlers directly dom node want events for. integral part of react, , not can avoid without manually attaching event handlers in componentdidmount. , manually removing them in componentwillunmount.

what's reason cancelling bubbling in map library? i'd try remove cancellation , see if works.


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 -