From 580814f7120e6fcf94cc4e3f066106fd8da62a2f Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 12 May 2016 13:42:11 -0400 Subject: [PATCH] Move the credentials dialog to always be under the body Fixes a CSS issue with display:table-cell and nesting --- static/js/directives/ui/credentials-dialog.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/static/js/directives/ui/credentials-dialog.js b/static/js/directives/ui/credentials-dialog.js index c574a478e..3f83606b1 100644 --- a/static/js/directives/ui/credentials-dialog.js +++ b/static/js/directives/ui/credentials-dialog.js @@ -22,6 +22,10 @@ angular.module('quay').directive('credentialsDialog', function () { $scope.rkt = {}; $scope.docker = {}; + $scope.$on('$destroy', function() { + document.body.removeChild($element[0]); + }); + // Generate a unique ID for the dialog. if (!$rootScope.credentialsDialogCounter) { $rootScope.credentialsDialogCounter = 0; @@ -36,6 +40,10 @@ angular.module('quay').directive('credentialsDialog', function () { $scope.show = function() { $element.find('.modal').modal({}); + + // Move the dialog to the body to prevent it from being affected + // by being placed inside other tables. + document.body.appendChild($element[0]); }; $scope.$watch('credentials', function(credentials) {