zefyr icon indicating copy to clipboard operation
zefyr copied to clipboard

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

Open khanhnguyen-96 opened this issue 5 years ago • 5 comments

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.

khanhnguyen-96 avatar Feb 23 '21 03:02 khanhnguyen-96

I have just tried and met the same issue.

namtranx07 avatar Feb 23 '21 07:02 namtranx07

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.

namtranx07 avatar Feb 24 '21 02:02 namtranx07

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.

khanhnguyen-96 avatar Feb 24 '21 07:02 khanhnguyen-96

it also happens on the real device (iOS)

taila-teq avatar Feb 26 '21 02:02 taila-teq

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

khanhnguyen-96 avatar Feb 26 '21 04:02 khanhnguyen-96