flutter-quill icon indicating copy to clipboard operation
flutter-quill copied to clipboard

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

Open CoreySafetyIndicators opened this issue 1 year ago • 3 comments

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 avatar Sep 19 '24 18:09 CoreySafetyIndicators

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

EchoEllet avatar Sep 19 '24 18:09 EchoEllet

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 avatar Sep 23 '24 13:09 CoreySafetyIndicators

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

CoreySafetyIndicators avatar Oct 07 '24 18:10 CoreySafetyIndicators

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.

EchoEllet avatar Dec 13 '24 13:12 EchoEllet