Sfoglia il codice sorgente

Mtootip Bug 修改

unknown 5 anni fa
parent
commit
ce59aad20f
1 ha cambiato i file con 10 aggiunte e 4 eliminazioni
  1. 10 4
      o2web/source/x_component_Template/MTooltips.js

+ 10 - 4
o2web/source/x_component_Template/MTooltips.js

@@ -129,7 +129,10 @@ var MTooltips = new Class({
                             }
                             e.stopPropagation();
                         }.bind(this);
-                        this.container.addEvent("mousedown", this.containerMousedownFun )
+                        this.container.addEvent("mousedown", this.containerMousedownFun );
+                        this.node.addEvent("mousedown", function (e) {
+                            e.stopPropagation();
+                        })
                     }
                 }
                 if( this.options.hideByClickBody ){
@@ -139,7 +142,10 @@ var MTooltips = new Class({
                         }
                         e.stopPropagation();
                     }.bind(this);
-                    $(document.body).addEvent("mousedown", this.bodyMousedownFun )
+                    $(document.body).addEvent("mousedown", this.bodyMousedownFun );
+                    this.node.addEvent("mousedown", function (e) {
+                        e.stopPropagation();
+                    })
                 }
             }
         }
@@ -828,9 +834,9 @@ var MTooltips = new Class({
         }
 
         if( this.positionX === "left" ){
-            left = targetCoondinates.left - nodeSize.x;
+            left = targetCoondinates.right - nodeSize.x;
         }else if( this.positionX === "right" ){
-            left = targetCoondinates.right;
+            left = targetCoondinates.left;
         }else if( this.positionX === "center" ){
             left = targetCoondinates.left + (targetCoondinates.width/2) - ( nodeSize.x / 2 )
         }