Fix issue where horizontal and vertical keyboard resizing could not happen at the same time. Fixes: 347390