pdf_editor_aleon35_react_plugin
Advanced tools
Comparing version 1.0.4 to 1.0.6
{ | ||
"name": "pdf_editor_aleon35_react_plugin", | ||
"version": "1.0.4", | ||
"version": "1.0.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -11,2 +11,3 @@ import { useEffect, useRef } from 'react'; | ||
const done = useRef(false); | ||
const iframeLoadedSuccessfully = useRef(false); // Add this ref to keep track of iframe's load state | ||
@@ -35,2 +36,3 @@ const createIframe = () => { | ||
iframe.onload = function() { | ||
iframeLoadedSuccessfully.current = true; | ||
// @ts-ignore | ||
@@ -44,3 +46,3 @@ iframe.contentWindow.postMessage({ file, fileName, tools }, '*'); | ||
const handleVisibilityChange = () => { | ||
if (!document.hidden) { | ||
if (!document.hidden && !iframeLoadedSuccessfully.current) { | ||
const iframe = document.getElementById('webviewer-1'); | ||
@@ -47,0 +49,0 @@ if (iframe) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
563975
165