← Back to team overview

ubuntu-sdk-team team mailing list archive

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

 

Olivier Tilloy has proposed merging lp:~osomon/ubuntu-ui-toolkit/lp1664620 into lp:ubuntu-ui-toolkit/staging.

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

Requested reviews:
  ubuntu-sdk-build-bot (ubuntu-sdk-build-bot): continuous-integration
  Zoltan Balogh (bzoltan)
Related bugs:
  Bug #1664620 in webbrowser-app (Ubuntu): "[regression] webbrowser_app.tests.test_basic_authentication fail with latest UITK"
  https://bugs.launchpad.net/ubuntu/+source/webbrowser-app/+bug/1664620

For more details, see:
https://code.launchpad.net/~osomon/ubuntu-ui-toolkit/lp1664620/+merge/317228

Check that window is not null before accessing its activeFocusItem property.
-- 
Your team Ubuntu SDK team is subscribed to branch lp:ubuntu-ui-toolkit/staging.
=== modified file 'src/imports/Components/Popups/1.3/popupUtils.js'
--- src/imports/Components/Popups/1.3/popupUtils.js	2017-01-16 17:03:26 +0000
+++ src/imports/Components/Popups/1.3/popupUtils.js	2017-02-14 16:32:05 +0000
@@ -72,7 +72,7 @@
 
     var popupObject;
     // If there's an active item, save it so we can restore it later
-    var prevFocusItem = (typeof window !== "undefined") ? window.activeFocusItem : null;
+    var prevFocusItem = (typeof window !== "undefined") && window ? window.activeFocusItem : null;
     if (params !== undefined) {
         popupObject = popupComponent.createObject(rootObject, params);
     } else {


References