Merge lp:~osomon/ubuntu-ui-toolkit/lp1664620 into lp:ubuntu-ui-toolkit/staging

Proposed by Olivier Tilloy on 2017-02-14
Status: Merged
Approved by: Zoltan Balogh on 2017-02-15
Approved revision: 2171
Merged at revision: 2171
Proposed branch: lp:~osomon/ubuntu-ui-toolkit/lp1664620
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 12 lines (+1/-1)
1 file modified
src/imports/Components/Popups/1.3/popupUtils.js (+1/-1)
To merge this branch: bzr merge lp:~osomon/ubuntu-ui-toolkit/lp1664620
Reviewer Review Type Date Requested Status
Christian Dywan Needs Fixing on 2017-02-15
ubuntu-sdk-build-bot continuous-integration Approve on 2017-02-15
Zoltan Balogh (community) 2017-02-14 Approve on 2017-02-14
Review via email: mp+317228@code.launchpad.net

Commit Message

Check that window is not null before accessing its activeFocusItem property.

Description of the Change

Check that window is not null before accessing its activeFocusItem property.

To post a comment you must log in.
Zoltan Balogh (bzoltan) wrote :

LGTM

review: Approve
Christian Dywan (kalikiana) wrote :

Test case?

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/imports/Components/Popups/1.3/popupUtils.js'
2--- src/imports/Components/Popups/1.3/popupUtils.js 2017-01-16 17:03:26 +0000
3+++ src/imports/Components/Popups/1.3/popupUtils.js 2017-02-14 16:32:05 +0000
4@@ -72,7 +72,7 @@
5
6 var popupObject;
7 // If there's an active item, save it so we can restore it later
8- var prevFocusItem = (typeof window !== "undefined") ? window.activeFocusItem : null;
9+ var prevFocusItem = (typeof window !== "undefined") && window ? window.activeFocusItem : null;
10 if (params !== undefined) {
11 popupObject = popupComponent.createObject(rootObject, params);
12 } else {

Subscribers

People subscribed via source and target branches