Merge lp:~michael-sheldon/ubuntu-keyboard/fix-1521803 into lp:ubuntu-keyboard

Proposed by Michael Sheldon
Status: Merged
Approved by: Bill Filler
Approved revision: 430
Merged at revision: 431
Proposed branch: lp:~michael-sheldon/ubuntu-keyboard/fix-1521803
Merge into: lp:ubuntu-keyboard
Diff against target: 52 lines (+23/-2)
2 files modified
qml/Keyboard.qml (+1/-1)
tests/autopilot/ubuntu_keyboard/tests/test_keyboard.py (+22/-1)
To merge this branch: bzr merge lp:~michael-sheldon/ubuntu-keyboard/fix-1521803
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+280936@code.launchpad.net

Commit message

Fix keyboard shifting out of capslock when in fields without preedit

Description of the change

Fix keyboard shifting out of capslock when in fields without preedit

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
430. By Michael Sheldon

Wait longer for word suggestion generation in tests

Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Are there any related MPs required for this MP to build/function as expected? Please list.

 * No

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)

 * Yes

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?

 * Yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/ubuntu-keyboard) on device or emulator?

 * Yes

If you changed the UI, was the change specified/approved by design?

 * No change

If you changed UI labels, did you update the pot file?

 * No change

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?

 * No change

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Keyboard.qml'
2--- qml/Keyboard.qml 2015-07-16 13:55:08 +0000
3+++ qml/Keyboard.qml 2015-12-18 14:00:54 +0000
4@@ -235,7 +235,7 @@
5 Connections {
6 target: input_method
7 onActivateAutocaps: {
8- if (keypad.state == "CHARACTERS") {
9+ if (keypad.state == "CHARACTERS" && keypad.activeKeypadState != "CAPSLOCK") {
10 keypad.activeKeypadState = "SHIFTED";
11 keypad.autoCapsTriggered = true;
12 } else {
13
14=== modified file 'tests/autopilot/ubuntu_keyboard/tests/test_keyboard.py'
15--- tests/autopilot/ubuntu_keyboard/tests/test_keyboard.py 2015-11-26 14:11:52 +0000
16+++ tests/autopilot/ubuntu_keyboard/tests/test_keyboard.py 2015-12-18 14:00:54 +0000
17@@ -397,6 +397,27 @@
18 Eventually(Equals(KeyPadState.CAPSLOCK))
19 )
20
21+ def test_capslock_stays_on(self):
22+ """Capslock should remain on when typing text.
23+
24+ """
25+ text_area = self.launch_test_input_area(
26+ input_hints=['Qt.ImhNoPredictiveText'])
27+ self.ensure_focus_on_input(text_area)
28+ keyboard = Keyboard()
29+ self.addCleanup(keyboard.dismiss)
30+
31+ keyboard.press_key('shift')
32+ keyboard.press_key('shift', True)
33+ keyboard.press_key('A', True)
34+ keyboard.press_key('B', True)
35+ keyboard.press_key('C', True)
36+
37+ self.assertThat(
38+ keyboard.active_keypad_state,
39+ Eventually(Equals(KeyPadState.CAPSLOCK))
40+ )
41+
42 # Note: based on UX design doc
43 def test_shift_state_returns_to_default_after_letter_typed(self):
44 """Pushing shift and then typing an uppercase letter must automatically
45@@ -692,7 +713,7 @@
46
47 keyboard.type('Helfn')
48
49- sleep(1)
50+ sleep(2)
51
52 keyboard.type(' ')
53

Subscribers

People subscribed via source and target branches