Keyboard popping up on iOS

Hi, recently the iOS keyboard has started popping up even when not going into editable fields.

Anyone has similar? Or any ideas how to debug?

I’m getting lots of trace like this which not sure whether is a problem or not:

021-01-29 16:33:50.380937+0100 MIDISynth-Control[932:507896] [LayoutConstraints] Unable to simultaneously satisfy constraints.

Probably at least one of the constraints in the following list is one you don’t want.

Try this:

(1) look at each constraint and try to figure out which you don’t expect;

(2) find the code that added the unwanted constraint or constraints and fix it.

(Note: If you’re seeing NSAutoresizingMaskLayoutConstraints that you don’t understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)

(

"<NSAutoresizingMaskLayoutConstraint:0x283c6f4d0 h=–& v=–& _UIButtonBarButton:0x11d0866b0.height == 0 (active)>",

"<NSLayoutConstraint:0x283c63110 _UIUCBKBSelectionBackground:0x11d086eb0.bottom == _UIButtonBarButton:0x11d0866b0.bottom - 6 (active)>",

"<NSLayoutConstraint:0x283c63070 V:|-(6)-[_UIUCBKBSelectionBackground:0x11d086eb0] (active, names: ‘|’:_UIButtonBarButton:0x11d0866b0 )>"

)

Will attempt to recover by breaking constraint

<NSLayoutConstraint:0x283c63110 _UIUCBKBSelectionBackground:0x11d086eb0.bottom == _UIButtonBarButton:0x11d0866b0.bottom - 6 (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.

The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.

2021-01-29 16:33:50.381676+0100 MIDISynth-Control[932:507896] [LayoutConstraints] Unable to simultaneously satisfy constraints.

Probably at least one of the constraints in the following list is one you don’t want.

Try this:

(1) look at each constraint and try to figure out which you don’t expect;

(2) find the code that added the unwanted constraint or constraints and fix it.

(Note: If you’re seeing NSAutoresizingMaskLayoutConstraints that you don’t understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)

(

"<NSAutoresizingMaskLayoutConstraint:0x283c6f1b0 h=–& v=–& _UIButtonBarButton:0x11d03c690.height == 0 (active)>",

"<NSLayoutConstraint:0x283c62d50 V:|-(6)-[_UIUCBKBSelectionBackground:0x11d085d50] (active, names: ‘|’:_UIButtonBarButton:0x11d03c690 )>",

"<NSLayoutConstraint:0x283c62df0 _UIUCBKBSelectionBackground:0x11d085d50.bottom == _UIButtonBarButton:0x11d03c690.bottom - 6 (active)>"

)

Will attempt to recover by breaking constraint

<NSLayoutConstraint:0x283c62df0 _UIUCBKBSelectionBackground:0x11d085d50.bottom == _UIButtonBarButton:0x11d03c690.bottom - 6 (active)>

thx

Same here. Did you find a solution?

no.

Although I cannot get rid of the warnings, I did found a work-around meanwhile. When I simply add a TextEditor to a dialog with nothing else added, then the keyboard issue already occurs. I traced it back all the way into the JUCE code and I found that if I use:
setWantsKeyboardFocus(true);
on the parent component, it works. So this is the dialog component itself and because I use viewport scrolling, I had to do it on the viewport as well.

It’s just so frustrating that the defaults in JUCE are all wrong it seems. Another highly irritating thing is that if you tap on the TextEditor, the caret is sometimes at the start of the text and sometimes where you tap.

1 Like

good to know, though I have no text editors - i wonder if this could be caused by combo boxes?

I’ll have a try