MarshallOfSound / react-electron-web-view

A simple wrapper to make Electrons WebView compatible with React
MIT License
64 stars 30 forks source link

avoid accumulating copies of event handlers when reattaching #15

Open leofidus opened 6 years ago

leofidus commented 6 years ago

I ran into the same issue as #3 (did-attach firing again after setting a surrounding container display:none, then display: block). The simplest fix seemed to be to just not add the events again if we did it once before. All this commit does is add the if statement to accomplish that.