Skip to content
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

Closed
rahul-dealroom opened this issue Jun 15, 2021 · 7 comments · Fixed by #399
Closed

Link popover stops working with react-dom 17 #409

rahul-dealroom opened this issue Jun 15, 2021 · 7 comments · Fixed by #399

Comments

@rahul-dealroom
Copy link

The code fix for react 17 not necessarily work with react-dom 17 especially with the link popover part

@robert-commonsku
Copy link

_toggleShowLinkInput() seems to be firing twice when the link button is pressed. Adding event.stopPropagation() should fix it.

@rahul-dealroom
Copy link
Author

okay thanks @robert-commonsku this fix/change needs to be done on the library itself right?

@robert-commonsku
Copy link

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.

@Blubagoo
Copy link

Where exactly would i put the event.stopPropogation function? This is where I have it currently and am not seeing a change in behavior.
image

Am I referencing the wrong variable?

@robert-commonsku
Copy link

{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.

@Blubagoo
Copy link

Blubagoo commented Jun 24, 2021 via email

ericfong added a commit to schooltracs/react-rte that referenced this issue Jul 23, 2021
@ericfong
Copy link

I added this commit in our own repo schooltracs@1d1ca8f

@sstur sstur linked a pull request Dec 1, 2021 that will close this issue
@sstur sstur closed this as completed Dec 1, 2021
ericfong added a commit to schooltracs/react-rte that referenced this issue May 12, 2022
ericfong added a commit to schooltracs/react-rte that referenced this issue May 12, 2022
sonnel pushed a commit to schooltracs/react-rte that referenced this issue Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants