wordpress-mobile / gutenberg-mobile

Mobile version of Gutenberg - native iOS and Android
GNU General Public License v2.0
255 stars 56 forks source link

Spaces are not shown as they are typed in right-aligned inputs #2053

Open SylvesterWilmott opened 4 years ago

SylvesterWilmott commented 4 years ago

Describe the bug When typing into a right-aligned input, spaces are not shown as they are typed. An example of this is in the Image block settings sheet "Alt Text". Although there are some discussions about changing the design of this field in particular (#922) I think this remains a viable fix for any future right-aligned inputs that are used within sheets.

To Reproduce

  1. Open settings sheet for an image in a post
  2. Type a character in the "Alt text" input followed by a space
  3. Notice that the space is not shown
  4. Type another character
  5. Notice that the space now shows

Expected behavior We also use right-aligned inputs in the site creation flow when entering a site title or tagline. We should match the behaviour of these inputs which displays the spaces as you type them.

Screenshots

example

Tested on iPhone X, iOS 13.3.1, WP 14.3

mchowning commented 4 years ago

I think this issue is limited to iOS. On Android, I'm seeing the space-after-a-letter immediately show. I do see that an initial space in the field is not shown, but I that's not the issue reported here.

Android Gif ![device-2020-05-05-143947 mp4](https://user-images.githubusercontent.com/4656348/81103522-23eff100-8edf-11ea-8f33-6b21e668e739.gif)
SergioEstevao commented 4 years ago

I confirmed this bug on iOS, but it looks it's a system-wide problem in iOS for right-aligned strings. I created a simple application using a system UITextView with the text alignment set to .right an I see the same problem.

I could even replicate the same issue on the Pages app from Apple! Just write some text, formatted with right alignment and the same thing happens.