From b99effe28cb263ce0a498a4e7444e853a0c84fe0 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Thu, 23 Oct 2014 12:51:19 +0100
Subject: [PATCH] Issue #2361383 by pivica: Fixed Drupal modal dialog should
 use ui-front class.

---
 core/misc/dialog/dialog.ajax.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/core/misc/dialog/dialog.ajax.js b/core/misc/dialog/dialog.ajax.js
index 4845cbdf1b57..4d9d6c454ecc 100644
--- a/core/misc/dialog/dialog.ajax.js
+++ b/core/misc/dialog/dialog.ajax.js
@@ -15,7 +15,10 @@
       // dialogs. Non-modal dialogs are responsible for creating their own
       // elements, since there can be multiple non-modal dialogs at a time.
       if (!$('#drupal-modal').length) {
-        $('<div id="drupal-modal" />').hide().appendTo('body');
+        // Add 'ui-front' jQuery UI class so jQuery UI widgets like autocomplete
+        // sit on top of dialogs. For more information see
+        // http://api.jqueryui.com/theming/stacking-elements/.
+        $('<div id="drupal-modal" class="ui-front"/>').hide().appendTo('body');
       }
 
       // Special behaviors specific when attaching content within a dialog.
-- 
GitLab