Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,13 @@ class KeyboardState(private val switchActions: SwitchActions) {
}
if (mode == layout.mode()) {
loadPreviousLayout(autoCapsFlags, recapitalizeMode)
} else if (!isInLayoutSlide && (mode == Mode.NUMPAD || mode == Mode.DPAD) && (layout == Utility.NUMPAD || layout == Utility.DPAD)) {
// numpad and dpad are sibling overlays: switching directly from one to the other must not
// push onto the previous-layout stack, otherwise closing the new overlay would fall back to
// the other overlay instead of the layout they were both opened over (usually the alphabet).
// only for a deliberate (non-sliding) switch: while sliding, the tail below pops the pushed
// entry, so we must take the regular setLayout path to keep that accounting balanced.
loadLayout(layout)
} else {
setLayout(layout)
}
Expand Down