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

ImageOptionsMenu causes error if the image dimensions are greater than the users screensize. #2248

Open
1 task done
CoreySafetyIndicators opened this issue Sep 19, 2024 · 4 comments
Labels
bug Something isn't working moderate Issues that are important for improving functionality or user experience. reproducible This bug has been confirmed and can be reliably reproduced.

Comments

@CoreySafetyIndicators
Copy link

Is there an existing issue for this?

Flutter Quill version

9.3.4

Steps to reproduce

Setup:
On web, have your browser maximized. Get an image that is the same resolution as your monitor.

  1. Click the insert image button in the Quill Editor.
  2. Select the image from the setup phase.
  3. Click on the image and select resize.
  4. Resize the image to the maximum size allowed.
  5. Click away so that the dialog goes away.
  6. Resize the window to a smaller size.
  7. Click on the image again and select resize.
  8. The error below will popup. This happens because the max size allowed in the slider is restricted to the screen size.
    image

Expected results

An error should not appear and the max should be set to the max image size if greater than the screen size.

Actual results

The following error will appear whenever the screen is resized. This is critical when saving an image that could be opened on different sized screens.
image

Code sample

Code sample
QuillEditor.basic(
      configurations: QuillEditorConfigurations(
        controller: quillPrefilledController,
        embedBuilders: kIsWeb
            ? FlutterQuillEmbeds.editorWebBuilders()
            : FlutterQuillEmbeds.editorBuilders(),
        minHeight: quillEditorMinHeight,
        maxHeight: double.infinity,
        padding: const EdgeInsets.all(4.0),
        expands: false,
      ),
    );

Additional Context

Screenshots / Video demonstration

[Upload media here]

Logs
[Paste your logs here]
@CoreySafetyIndicators CoreySafetyIndicators added the bug Something isn't working label Sep 19, 2024
@EchoEllet
Copy link
Collaborator

Can you try the latest version? 10.6.0 or newer versions?

@CoreySafetyIndicators
Copy link
Author

We are waiting for one more of out dependencies to upgrade to using Web 1.0. Once that is done, I can try it. I did look a the source code in the latest version and there didn't appear to be any changes to this file.

@CoreySafetyIndicators
Copy link
Author

I tested this on 10.7.5 and was still able reproduce this issue.

@EchoEllet EchoEllet mentioned this issue Dec 13, 2024
1 task
@EchoEllet EchoEllet added reproducible This bug has been confirmed and can be reliably reproduced. moderate Issues that are important for improving functionality or user experience. labels Dec 13, 2024
@EchoEllet
Copy link
Collaborator

It looks like the image resize functionality is broken, just like the image saved previously (see #2403). We will need to rewrite flutter_quill_extensions fully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working moderate Issues that are important for improving functionality or user experience. reproducible This bug has been confirmed and can be reliably reproduced.
Projects
None yet
Development

No branches or pull requests

2 participants