Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.13.2, 5.15.0
-
None
-
90d64dea7d0370abcb5b787bcc77dc4770f491ed (qt/qtvirtualkeyboard/dev) 84c0466a53 (qt/tqtc-qtvirtualkeyboard/5.15) 84c0466a53 (qt/tqtc-qtvirtualkeyboard/5.15.10)
Description
When focus is initially set on TextField from the start of application, shift key on virtual keyboard will be disabled until user clicks on TextField.
I have looked into the issue, it seems like the problem is that in QGuiApplicationPrivate::processActivatedEvent.
- First we call:
QCoreApplication::sendSpontaneousEvent(QGuiApplicationPrivate::focus_window, &focusIn), - sendSpontaneousEvent will trigger ShiftHandler::reset(), that will try to get d->inputContext->priv()->inputItem() - which is currently focused item. And currently focused item is currently null and will be set only later(see below).
- And after ShiftHandler::reset(which fail to update inputMethodHints) in QGuiApplicationPrivate::processActivatedEvent we call
self->_q_updateFocusObject(qApp->focusObject());
This line actually sets currently focused item, but there will be no call to ShiftHandler::reset() later to observe this change.
I have attached a repoduction.
Is there any workaround for this issue?
Attachments
Issue Links
- relates to
-
QTBUG-87277 Cannot input on the VirtualKeyboard after Window being toggled from Hidden to Windowed
- Closed
For Gerrit Dashboard: QTBUG-86190 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
316091,9 | Fix activation of input panel when initial active focus is set | dev | qt/qtvirtualkeyboard | Status: MERGED | +2 | 0 |
330257,2 | Fix activation of input panel when initial active focus is set | tqtc/lts-5.15 | qt/tqtc-qtvirtualkeyboard | Status: MERGED | +2 | 0 |