-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link popover stops working with react-dom 17 #409
Comments
_toggleShowLinkInput() seems to be firing twice when the link button is pressed. Adding event.stopPropagation() should fix it. |
okay thanks @robert-commonsku this fix/change needs to be done on the library itself right? |
Yes. I have no affiliation with this library except as a user. I just noticed this problem when I upgraded react. I was able to resolve it by monkey-patching node_modules/react-rte/dist/react-rte.js to include a call to stopPropagation in the _toggleShowLinkInput function. |
|
Amazing thank you so much
On Thu, Jun 24, 2021 at 4:50 PM robert-commonsku ***@***.***> wrote:
{key:"_toggleShowLinkInput",value:function(t){t.stopPropagation();var
e=this.state.showLinkInput;if(e){var n=!0;if(t&&"click"===t.type){var
r=ut.a.findDOMNode(this).parentNode,i=document,o=i.activeElement;null==o||o===document.body||r.contains(o)||(n=!1)}n&&this.props.focusEditor()}this.setState({showLinkInput:!e})}}
The t.shopPropagation(); at the beginning of the function is what I added
to resolve this issue.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#409 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGNK3JAADYRK33PBT2AJJWLTUOLBPANCNFSM46XD3WYQ>
.
--
Jim Tisdale, Full Stack Web Developer program, Thinkful.com
|
I added this commit in our own repo schooltracs@1d1ca8f |
The code fix for react 17 not necessarily work with react-dom 17 especially with the link popover part
The text was updated successfully, but these errors were encountered: