Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Take over enhancements to render Draft.js in an iframe #1938

Closed

Conversation

claudiopro
Copy link
Contributor

@claudiopro claudiopro commented Nov 19, 2018

Summary

Takes over and applies requested PR feedback to #1877 by @haikyuu.

Refer to original PR for context and discussion.

Test Plan

Run some manual smoke tests on the editor running in an iframe as follows:

yarn
python3 -m http.server 8080 .
open http://localhost:8080/examples/draft-0-10-0/iframe/iframe.html

@haikyuu
Copy link
Contributor

haikyuu commented Nov 19, 2018

Thanks for taking it on @claudiopro.
I've been quite busy these days. 👍

@claudiopro
Copy link
Contributor Author

Thanks to you @haikyuu for working out most of the changes! I just took it from there 😄

@claudiopro claudiopro changed the title Fix iframe bug commandeered Take over enhancements to render Draft.js in an iframe Nov 19, 2018
Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claudiopro has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claudiopro is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@odusseys
Copy link

I'm pretty sure there's is a problem with the way you destructure your event targets (eg. I'm having errors in DraftEditorDragHandler.js) to get the ownerDocument. For instance, if your target is the document itself, ownerDocument will be null, in which case you need to fallback to the target itself.

@claudiopro
Copy link
Contributor Author

Thanks for the heads up @odusseys, do you mind sharing steps to reproduce the error?

@odusseys
Copy link

odusseys commented Dec 3, 2018

Eh I'm not a hundred percent sure anymore since I fixed it on my fork and don't really have time to reproduce it; but I think I just added the drag plugin from draft-js-plugins together with the image plugin, and dragging threw an error (ownerDocument was null).
Either way this is the normal behavior (https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument) so null should be checked either way.

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claudiopro has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@haikyuu
Copy link
Contributor

haikyuu commented Feb 12, 2019

Hey @claudiopro what's the status on this one? anything i can do to help?

@kfrp
Copy link

kfrp commented Jul 19, 2019

Any updates on this y'all?

@kfrp
Copy link

kfrp commented Jul 21, 2019

@claudiopro @haikyuu thank you for your work on this. I was able to make it work pretty seamlessly with the latest version of Draft by replicating your commits. (Just needed to add an isHTMLBRElement check in the style of isHTMLAnchorElement etc.)

@facebook-github-bot
Copy link

@jack-arms merged this pull request in dceddf5.

mmissey pushed a commit to mmissey/draft-js that referenced this pull request Mar 24, 2020
…ve#1938)

Summary:
**Summary**

Takes over and applies requested PR feedback to facebookarchive#1877 by haikyuu.

Refer to original PR for context and discussion.

**Test Plan**

Run some manual smoke tests on the editor running in an iframe as follows:

```
yarn
python3 -m http.server 8080 .
open http://localhost:8080/examples/draft-0-10-0/iframe/iframe.html
```
Pull Request resolved: facebookarchive#1938

Reviewed By: claudiopro

Differential Revision: D13137413

Pulled By: jack-arms

fbshipit-source-id: efcdbabc7d8d2aff4fbebc8b06c22d57756ebc12
vilemj-Viclick pushed a commit to kontent-ai/draft-js that referenced this pull request Jul 16, 2020
…ve#1938)

Summary:
**Summary**

Takes over and applies requested PR feedback to facebookarchive#1877 by haikyuu.

Refer to original PR for context and discussion.

**Test Plan**

Run some manual smoke tests on the editor running in an iframe as follows:

```
yarn
python3 -m http.server 8080 .
open http://localhost:8080/examples/draft-0-10-0/iframe/iframe.html
```
Pull Request resolved: facebookarchive#1938

Reviewed By: claudiopro

Differential Revision: D13137413

Pulled By: jack-arms

fbshipit-source-id: efcdbabc7d8d2aff4fbebc8b06c22d57756ebc12
alicayan008 pushed a commit to alicayan008/draft-js that referenced this pull request Jul 4, 2023
Summary:
**Summary**

Takes over and applies requested PR feedback to #1877 by haikyuu.

Refer to original PR for context and discussion.

**Test Plan**

Run some manual smoke tests on the editor running in an iframe as follows:

```
yarn
python3 -m http.server 8080 .
open http://localhost:8080/examples/draft-0-10-0/iframe/iframe.html
```
Pull Request resolved: facebookarchive/draft-js#1938

Reviewed By: claudiopro

Differential Revision: D13137413

Pulled By: jack-arms

fbshipit-source-id: efcdbabc7d8d2aff4fbebc8b06c22d57756ebc12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants