Focus fails when TextField includes axis: .vertical

I've found another interesting issue with the Focus system.

My text case is SwiftUI in Preview or Simulator (using an iPad mini case) -- I haven't tried this on other environments, so your mileage may vary.

I have a Form including several TextFields. Adding the usual @FocusState logic, I observe that if I type a TAB key, then

(a) If the TextFields are specified using TextField(“label”, text: $text), typing the tab key switches focus from field to field as expected, BUT

(b) If the TextFields are specified using TextField(“label”, text: $text, axis: .vertical), typing the tab key adds whitespace to the field and does NOT change focus.

In the latter case, I need to use an .onKeyPress(.tab) {….} modifier to achieve the desired result.

Reported as FB15432840

Focus fails when TextField includes axis: .vertical
 
 
Q