-
Notifications
You must be signed in to change notification settings - Fork 344
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
React component goes blank after opening and closing a modal with the component inside. #251
Comments
same problem |
hello @QuaCode and @TeoSymphonia, we are going to check and update you |
Same problem here, sometimes reloading one or several times the page makes it work again |
…e of the canvas dimensions are not set (Issue #251)
The issue is fixed in version 4.3.8, please re-check it and let us know if all is good. |
Hi everyone, I have version Stack"@capacitor/core": "4.6.1", UsageInside of an modal I'm conditional rendering FileRobotBug.mov |
@zoranlj I checked the video you have attached, it doesn't seem like an issue ur provided image hasn't loaded and there is an error generated (the pop-up shown) which is logical. |
What am I doing wrong?
Sometime output from the console is ok. Sometimes output from the console is not OK. |
@zoranlj sorry for late reply, it is not appropriate to have an empty output from the plugin, so please create a new issue with ur production steps and codesandbox for ur code to check the issue |
@AhmeeedMostafa @zoranlj Were you able to resolve this issue? |
@josec0609 Try setting |
@zoranlj Thanks for the suggestion. Started playing around with savingPixelRatio, but it doesn't seem like setting it to any value solves the issue. |
I created sandbox to recreate the issue shown by @zoranlj above and what I would assume is the same root cause for issue reported by @QuaCode. sandbox url I think the issue is related to how canvas elements are garbage collected by Safari. Article on Safari canvas elements causing memory issues Browser implementation for cleaning up canvas elements differs but on Safari and iOS this blank canvas issue is more prevalent. To recreate issue you need to visit sandbox on Safari or on iOS and open image editor & save image a few times ( (don't even have to edit image). You will eventually get the following warning on console Related reference issue seen by others creating projects using Konva: konvajs/konva#571 I don't seem to see the memory issues when just mounting/unmounting |
This is still happening and i get same error as @josec0609, after taking a picture with iOS-iphone 13 pro when editing the picture a few times(just edit and save 2-3 times), image goes blank. The imageBase64 is missing, same as @zoranlj. |
It doesn't matter if you pass your source url as a prop or place the string directly. After doing conditional rendering a few times, the editor will open with a blank canvas.
import FilerobotImageEditor, { TABS } from 'react-filerobot-image-editor';
<FilerobotImageEditor
savingPixelRatio={4}
previewPixelRatio={window.devicePixelRatio}
source={imageToEdit}
onSave={editedImageObject => {
if (!editedImageObject.imageBase64) return;
console.log(editedImageObject.imageBase64);
}}
onClose={onCancel}
Text={{
fontSize: 16,
}}
Crop={{
minWidth: 14,
minHeight: 14,
maxWidth: null,
maxHeight: null,
ratio: 'original',
ratioTitleKey: 'Cortar',
noPresets: false,
autoResize: false,
presetsItems: [],
presetsFolders: [],
}}
Pen={{
strokeWidth: 5,
}}
tabsIds={[TABS.ADJUST, TABS.ANNOTATE, TABS.FINETUNE]}
defaultTabId={TABS.ADJUST}
/>
The text was updated successfully, but these errors were encountered: