Merge lp:~methanal-developers/methanal/777367-focus-first-input into lp:methanal

Proposed by Jonathan Jacobs
Status: Merged
Approved by: Tristan Seligmann
Approved revision: 171
Merged at revision: 171
Proposed branch: lp:~methanal-developers/methanal/777367-focus-first-input
Merge into: lp:methanal
Diff against target: 18 lines (+6/-2)
1 file modified
methanal/js/Methanal/View.js (+6/-2)
To merge this branch: bzr merge lp:~methanal-developers/methanal/777367-focus-first-input
Reviewer Review Type Date Requested Status
Tristan Seligmann Approve
Review via email: mp+59982@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Tristan Seligmann (mithrandi) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'methanal/js/Methanal/View.js'
2--- methanal/js/Methanal/View.js 2011-04-13 14:26:49 +0000
3+++ methanal/js/Methanal/View.js 2011-05-04 19:29:22 +0000
4@@ -1024,8 +1024,12 @@
5 for (var j = 0; j < container.childWidgets.length; ++j) {
6 var widget = container.childWidgets[j];
7 if (widget.getInputNode) {
8- widget.getInputNode().focus();
9- return;
10+ var inputNode = widget.getInputNode();
11+ // Sometimes there is not yet an input node.
12+ if (inputNode !== undefined) {
13+ widget.getInputNode().focus();
14+ return;
15+ }
16 } else {
17 // Edge closer and closer to something useful.
18 widget.node.focus();

Subscribers

People subscribed via source and target branches

to all changes: