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

The last line of ZefyrField clipped when in read only mode (iOS only) #487

Open
khanhnguyen-96 opened this issue Feb 23, 2021 · 5 comments

Comments

@khanhnguyen-96
Copy link

Steps to Reproduce

  1. Load the Zefyr example. change the content of basics_read_only_view.note to this (as long as the last displayed text line contains only Emojis).
[{"insert":"adasdasdasdsaijdvio ioiasm ioasm doisam doasim doasm doasid maosim doasim doas mdasio dmas\n❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥❤️‍🔥\n"}]
  1. Open the Read only example page. As we can see from the image below, the bottom part of the last line (which contains only emojis) was clipped.
    image

However, if the last line contains any text other than emojis, everything works normally.
image

So far I can only reproduce this on iOS.

Logs

No logs

[✓] Flutter (Channel stable, 1.22.6, on Mac OS X 10.15.7 19H15 darwin-x64, locale en)
    • Flutter version 1.22.6 at /Users/teq-ios/development/flutter
    • Framework revision 9b2d32b605 (4 weeks ago), 2021-01-22 14:36:39 -0800
    • Engine revision 2f0af37152
    • Dart version 2.10.5

 
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/teq-ios/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /Users/teq-ios/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] Connected device (1 available)
    • iPhone X (mobile) • 0E7083D8-7982-4E96-9DB7-67D5085D2094 • ios • com.apple.CoreSimulator.SimRuntime.iOS-12-4 (simulator)

! Doctor found issues in 2 categories.
@namtranx07
Copy link

I have just tried and met the same issue.

@namtranx07
Copy link

This issue appears to happen only when the editor isn't focused(The cursor isn't visible) so the read-only mode is not related.

@khanhnguyen-96
Copy link
Author

This issue appears to happen only when the editor isn't focused(The cursor isn't visible) so the read-only mode is not related.

I have just tried to replicate this in edit mode and you're right. Maybe there's a bug in the implementation of how caret is displayed because from what I see in the source code, they are implemented differently between Android and iOS. I will investigate more.

@taila-teq
Copy link

it also happens on the real device (iOS)

@khanhnguyen-96
Copy link
Author

I did implement a workaround for this issue at this commit. But still, I can't figure out why it behaves like this 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants