fix(developer): resync model and keyboard after device switch in Server#16127
fix(developer): resync model and keyboard after device switch in Server#16127mcdurdin wants to merge 1 commit into
Conversation
When a new OSK is attached, we need to set its active keyboard and lexical model. These are undocumented API contracts between Keyman Engine for Web and Keyman Developer Server, so this appears to have changed in v.19 for keyboards (although the sync is also necessary for v.18). Fixes: #15217 Test-bot: skip
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
Yes, I think it would be good to investigate what changed that causes this different behaviour. |
A bisect showed that this regressed in 19.0.241 with the merge of #16015. That's going to be hard to bisect further! I will attempt to step-through the source. |
| // After attaching a new OSK, we also need to set the OSK's active keyboard | ||
| // and model | ||
| newOSK.activeKeyboard = keyman.contextManager.activeKeyboard; // Note: undocumented KeymanWeb API refs on both sides |
There was a problem hiding this comment.
After #16156 lands, activeKeyboard is properly set automatically again.
| // After attaching a new OSK, we also need to set the OSK's active keyboard | |
| // and model | |
| newOSK.activeKeyboard = keyman.contextManager.activeKeyboard; // Note: undocumented KeymanWeb API refs on both sides | |
| // After attaching a new OSK, we also need to set the OSK's active model |
@ermshiperete, should model attachment be resolved web-side also?
|
Returned to draft in order to discuss whether model fix should be done in Keyman Engine |
When a new OSK is attached, we need to set its active keyboard and lexical model. These are undocumented API contracts between Keyman Engine for Web and Keyman Developer Server, so this appears to have changed in v.19 for keyboards (although the sync is also necessary for v.18).
@ermshiperete the behaviour for active keyboard has changed between v.18 and v.19. In v.18, switching device, the new osk would receive the active keyboard automatically. But in v.19, we need to assign it in Server. I think we may need to track where the change originates in case it impacts other use cases?
Fixes: #15217
Test-bot: skip