Browse Source

HPCC-9301 Dojo 1.9 + Chrome + GraphControl Disappearing

Dojo 1.9 introduced a "_wrapper" <div> around each tab container pane.  Updated
"GraphControl.watchStyleChange" to take this into consideration.

Removed the "chrome" only condition in "GraphControl.watchSelect" as they are
also causing visual artifacts in IE10 (also introduced in dojo 1.9).

Fixes HPCC-9301

Signed-off-by: Gordon Smith <gordon.smith@lexisnexis.com>
Gordon Smith 12 years ago
parent
commit
8bdfac0d38
1 changed files with 9 additions and 5 deletions
  1. 9 5
      esp/files/scripts/GraphWidget.js

+ 9 - 5
esp/files/scripts/GraphWidget.js

@@ -418,7 +418,7 @@ require([
             },
 
             watchSelect: function (select) {
-                if (has("chrome") && select) {
+                if (select) {
                     //  Only chrome needs to monitor select drop downs.
                     var context = this;
                     select.watch("_opened", function () {
@@ -449,16 +449,20 @@ require([
                     //  Hijack the dojo style class replacement call and monitor for elements in our watchList. 
                     aspect.around(domClass, "replace", function (origFunc) {
                         return function (node, addStyle, removeStyle) {
-                            if (node.id in watchList) {
+                            if (node.firstChild && (node.firstChild.id in watchList)) {
                                 if (addStyle == "dijitHidden") {
-                                    watchList[node.id] = true;
+                                    watchList[node.firstChild.id] = true;
                                     dojo.style(node, "width", "1px");
                                     dojo.style(node, "height", "1px");
+                                    dojo.style(node.firstChild, "width", "1px");
+                                    dojo.style(node.firstChild, "height", "1px");
                                     return;
-                                } else if (addStyle == "dijitVisible" && watchList[node.id] == true) {
-                                    watchList[node.id] = false;
+                                } else if (addStyle == "dijitVisible" && watchList[node.firstChild.id] == true) {
+                                    watchList[node.firstChild.id] = false;
                                     dojo.style(node, "width", "100%");
                                     dojo.style(node, "height", "100%");
+                                    dojo.style(node.firstChild, "width", "100%");
+                                    dojo.style(node.firstChild, "height", "100%");
                                     return;
                                 }
                             }