Tui.image-editor: Unable to edit text field

Created on 5 Mar 2020  路  5Comments  路  Source: nhn/tui.image-editor

Version

3.8.0

Development Environment

I open the editor in bootstrap 4 modal window.
Tested in Opera and Chrome.

Current Behavior

I insert text in editor, but i can't edit text. Input by keyboard not working.
There are no errors in the console.

Text editor function works good when it鈥檚 built in the page, however, in a modal window it doesn鈥檛 work

image

 let imageEditor = new tui.ImageEditor('.imageEditor', {
              includeUI: {
                loadImage: {
                  path: URL.createObjectURL(file.data),
                  name: file.data.name
                },
                theme: blackTheme, // or whiteTheme

                menuBarPosition: 'left'
              },
              cssMaxWidth: 1024,
              cssMaxHeight: 768,
              usageStatistics: false
            });

Expected Behavior

Bug

Most helpful comment

Anyone stumbling upon this issue who is also using Material -UI library and trying to show the Image Editor in a Dialog Component, you can pass the prop disableEnforceFocus to the dialog Root and it will work

All 5 comments

I can see same issue.
There are 2 way to fix issue.

But I think both are not good solutions. I think it should be fixed with tui-image-editor.

Anyone stumbling upon this issue who is also using Material -UI library and trying to show the Image Editor in a Dialog Component, you can pass the prop disableEnforceFocus to the dialog Root and it will work

@jinwoo-kim-nhn, @lja1018, are there any plans to make this worker better in tui-image-editor?

We also use this library with Material-UI within a Dialog Component and we had to resort to disableEnforceFocus (thanks @vsvanshi !) but according to their docs it affects accessibility.

If true, the modal will not prevent focus from leaving the modal while open.
Generally this should never be set to true as it makes the modal less accessible to assistive technologies, like screen readers.

For anyone with the same problem using React Bootstrap modal, enforceFocus solves the problem - at the expense of reduced accessibility.
cc @lightway82

Was this page helpful?
0 / 5 - 0 ratings