iPad with external keyboard connected can't see post when replying

Yeah I expected as much but haven’t seen the edit frame behave like this before. Haven’t enabled anything specific.

I just tested it on my own instance, and it works perfectly! Brilliant @sam – I love it!

3 Likes

Be sure to also install Smooth J/K navigation when using keyboard as well (this is shortly going to be integrated)

The iPad keyboard experience is far superior with j/k navigation that works perfectly

5 Likes

Okay, so I’ve switched to Sam’s Simple Theme. What else do I need to do to see the external keyboard setting on Discourse meta?

Or if there’s something else you need me to do, then I didn’t catch it.

Did you look at your preferences / interface / apple?

I can see it from the Light Theme.

2 Likes

Oh yeah I see it now. Sweet. Test test.

Okay, yeah, obviously better! Nice improvements.

Some things I noted:

  • The gray part of the keyboard sits on top of the composer’s bottom part (see below)
  • Swiping (scrolling, really) with the finger up and down in the textarea causes the page underneath to scroll
  • Tab + Space for submitting is, agreed, annoying not to be able to do
  • I don’t see momentum scrolling working within the preview nor the textarea (but perhaps I haven’t activated the right thing)
  • After uploading an image, the textarea refused to allow input and I had to refresh the page. Refreshing the page solved the issue, but then the reply cache was not there, as I had expected. Probably not related to your current work but thought I’d mention.

That’s it for now. Thanks!

8 Likes

I did figure out a workaround in latest which is now deployed on meta. For whatever reason Apple decided developers can not get access to CTRL and COMMAND from JavaScript… Cause … Reasons.

So, now on iPad (and only iPad) you can submit a post with ALTENTER

Additionally I rolled the “I have a physical keyboard” option into core and it will always show up in the interface section on iPad’s only.

Last big piece that is awaiting merging is getting smooth moves merged into core (something that should happen today)

There is a limit to creative workarounding we can do to all the Apple bugs here, really we have no choice as consumers and a community to apply pressure on Apple to play nicer. For example arrow keys don’t work for search results which is annoying. (That said I did read online that Apple had arrows totally bust on iPad prior to iOS 11 so … yay … progress)

Anyway … this post was posted from my iPad and I don’t even need to reach to the blue reply button to submit… so YAY

10 Likes

@littke this is my last one for a bit…

https://github.com/discourse/discourse/commit/cdf34657f6c56b0c9339d639bbba5260ed1eb482

I will do my “daily meta catch up” a few times over the next week on my iPad + Keyboard and see if there are any other big changes we need.

Overall the lesson learned here is very much what the commits say.

Over the years we carried a lot of exotic workarounds due to Safari on iOS quirks that happen if you are using a virtual keyboard.

The switch core carries now is

  1. You tell us you have a physical keyboard
  2. We disable a bunch of hacks that we had in place

So, long story short, we now can (and do) apply focus to titles and textarea when you start a new reply.

This feature request has gotten quite big and has run in 100 directions… I am closing it for now, let’s do a new topic to discuss any new quirks we discover. But :bear: with me and maybe wait 1-2 weeks living with the current patches prior to doing new specific iPad + Keyboard quirks topics.

12 Likes

Looks like iOS 13 will implement Visual Viewport API - Web APIs | MDN

6 Likes

Wow that is so experimental it’s not even listed in caniuse yet…

1 Like