question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Drag & Drop tools not working inside iframe

See original GitHub issue

I’m using react-email-editor rendered inside an iframe, which is by itself rendered in another iframe as an embeded app. The component renders without errors or warnings, but none of the drag-and-drop features work.

No errors show up when dragging and dropping either. Is this an expected behaviour being used this way? Or is it an issue.

“react-email-editor”: “^1.2.0”, “react”: “^17.0.2”, “react-dom”: “^17.0.2”,

Code used:

import React, { useRef } from 'react';
import { render } from 'react-dom';

import EmailEditor from 'react-email-editor';

const NewMail = (props) => {
    const emailEditorRef = useRef(null);

    const exportHtml = () => {
        emailEditorRef.current.editor.exportHtml((data) => {
        const { design, html } = data;
        console.log('exportHtml', html);
        });
    };

    const onLoad = () => {
        // you can load your template here;
        // const templateJson = {};
        // emailEditorRef.current.editor.loadDesign(templateJson);
    };

    return (
        <div>
        <div>
            <button onClick={exportHtml}>Export HTML</button>
        </div>
            <EmailEditor
            ref={emailEditorRef}
            onLoad={onLoad}
            options={{}}
            />
        </div>
    );
}

export default NewMail;

image

Later edit:

This seems to happen only when using Chrome.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

2reactions
emattsoncommented, Nov 12, 2021

Any update on this? I’m seeing the same issue intermittently in chrome as well

2reactions
damiandzwigajcommented, May 14, 2021

We have similar problem but in our case unlayers editor.js file breaks every drag & drop events in our react application

Read more comments on GitHub >

github_iconTop Results From Across the Web

Drag and Drop in iframe not working in Spring - Stack Overflow
I am trying to implement drag and drop in iframe in Spring (working in Eclipse 2020-03) and iframe just does not seem to...
Read more >
936299 - Drag drop inside iframe not working - Monorail
Steps to reproduce the problem: 1. Open url in Chrome - https://jsfiddle.net/shirinrpatel/618pdxe9/5/ 2. Try to perform drag and drop
Read more >
Webview API - Visual Studio Code
Use the Webview API to create fully customizable views within Visual Studio Code.
Read more >
iFrames in Selenium WebDriver - Tools QA
iframes are embedded into an HTML page using <iframe> tag. · To work with different nested iframes, we can use the method switchTo()...
Read more >
Handling iFrame issue with Katalon Studio - Medium
1. Given that you want to capture the JQueryUI's Drag and Drop example (this draggable control is an iframe), as shown in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found