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

No text area shows on iOS simulator #107

Open
mark8044 opened this issue Aug 8, 2021 · 7 comments
Open

No text area shows on iOS simulator #107

mark8044 opened this issue Aug 8, 2021 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@mark8044
Copy link

mark8044 commented Aug 8, 2021

On the iOS simulator there is no text area showing, but there is a toolbar.

  • Toolbar is different from the Summernote toolbar in that it stretches across the screen and you have to swipe to reveal all the options

On a real android device the texture does show and you can type, although it is quite laggy (release mode)

@mark8044 mark8044 added the bug Something isn't working label Aug 8, 2021
@tneotia
Copy link
Owner

tneotia commented Aug 8, 2021

Do you mind posting screenshots of what you see on the iOS simulator?

Also what do you mean by laggy on Android side? I have a production app using the editor and haven't experienced lag on my devices. Just trying to understand because lag on a text editor is odd, we are inserting text one letter at a time so if it is laggy then there is a major issue. Thanks!

@mark8044
Copy link
Author

mark8044 commented Aug 8, 2021

in the iOS simulator its just a toolbar and no text area, there is a faint grey outlined box where the texture should be but no text area

Update:

  • Original I was only using import 'package:html_editor_enhanced/html_editor.dart';
  • I added import 'package:html_editor_enhanced/utils/options.dart'; and import 'package:html_editor_enhanced/utils/shims/dart_ui_real.dart'; and now the text area shows up on the simulator
  • But typing is not possible, a tiny bit of the top of the keyboard shows up at the bottom of the screen but nothing can be done with it (screen shot attached)
  • The console now spits this out
flutter: JavaScript execution returned a result of an unsupported type
flutter: {style: , fontName: sans-serif, fontSize: 3, font: [false, false, false], miscFont: [false, false, false], color: [rgb(0, 0, 0), ], paragraph: [false, false], align: [true, false, false, false], lineHeight: normal, direction: ltr}

As for android lag, the lag isn't when you type, but when swiping the single line toolbar left and right. Everything about flutter looks very native/fast but this has noticeable lag so its unpleasant and gives a very hacked feel to the app. I understand this is depending on a web view, but I have other hacked solutions using web views and they are lightening fast so this one stands out.

Screen Shot 2021-08-08 at 3 38 20 PM

@mark8044
Copy link
Author

mark8044 commented Aug 8, 2021

Oddly when clicking on the add a link icon, you can type into that box

@tneotia
Copy link
Owner

tneotia commented Aug 8, 2021

In the flutter simulator text input into WebView is broken. On a physical iOS device it will allow you to type. You can test this by the solution here: #7 (comment)

As for the toolbar it uses fully native flutter components so I am very surprised that it is laggy for you, on my S10+ it feels very smooth. I might be able to optimize it a bit though. In the meantime, if you don't like the single line toolbar you can go with the gridview toolbar as well which won't lag (because it doesn't move, of course).

Edit: the JavaScript error can be ignored, it doesn't affect anything.

@mark8044
Copy link
Author

mark8044 commented Aug 8, 2021

Ok I see, thanks for the help with this, it is appreciated!

If there is hope to fix the problem with the simulator it would be great to make that top priority, as without the simulator it makes development very very difficult.

Going to grid view does not help with the lag.

Sure there is no lag in the sense that you cannot scroll anymore so you don't see the lag. But this package is very resource intensive for some reason?

I'll explain

I actually have a modal which appears to present this text editor. This modal appears with a nice smooth drawer like effect, very similar to the modal-bottom-sheet package.

I use this type of modal all over my app and its smooth as butter. Except when opening the sheet with this editor its very very slow, choppy and laggy. Closing it is even worse.

I think the functionality offered here will be of real benefit, as there seems to be no really good editor right now, and yours could fit in very well, but with this kind of lag it will limit wide adoption in flutter IMO.

Keep up the great work, hoping the lag can be fixed as well as iOS simulator issues

Image of modal sheets

@tneotia
Copy link
Owner

tneotia commented Aug 8, 2021

If there is hope to fix the problem with the simulator it would be great to make that top priority, as without the simulator it makes development very very difficult.

Yes it can be fixed with the solution I linked above, you will have to use your mouse to manually click the letters on the keyboard but you cannot use the physical keyboard unfortunately.

I will definitely look into the performance issues, I have a few ideas regarding that. Thanks for the detailed info!

@tranvieth2t
Copy link

Hi @tneotia , as shown on iOS, is there any way to remove the "done" bar on iPhone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants