mozilla-b2g/gaia — pull request #4258 by lodr (2012-08-31 22:51:43+00:00)
Title: Bugfixing keyboard anomalies when switching from input to input

# Overview

Basically, process was wrong. Now resetting on showing IME when the proper input's type has been set. Furthermo reset re, now reset always re-draw the UI. This is not optimal and further information is given in the next section.

Actually, two event can reset the keyboard:
1. Switching to another language
2. Showing IME when entering an input

Very issues are solved now. For instance:
* Now the shift key is properly coloured when automatically enabling uppercase.
* Now uppercase is no more *randomly* locked.
* Now changing from one input to another after changing the layout reset both the layout and the change layout key.

# Flaws and future work

Reset should not readraw each time is called. Instead, it only should redraw when `_isUpperCase`, `_isUpperCaseLocked` or `_currentLayoutMode` actually change.