Skip to content

IE excanvas tip width #75

@l0co

Description

@l0co

In IE working width excanvas there's an issue with tip width. If you have long text in the tip in single line, the width can be unlimited and your tip is displayed outside the visible area. For other browsers it works fine - it adjusts the tip width/height automatically.

Here is my patch for this:

Index: opentip-prototype-excanvas.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- opentip-prototype-excanvas.js   (revision 551)
+++ opentip-prototype-excanvas.js   (revision )
@@ -343,6 +343,15 @@
       top: "0px"
     });
     this.dimensions = this.adapter.dimensions(this.container);
+    if (isIE && this.dimensions.width>400) {
+        this.adapter.css(this.container, {
+            width: "400px",
+            height: "auto",
+            left: "0px",
+            top: "0px"
+        });
+        this.dimensions = this.adapter.dimensions(this.container);
+    }
     this.dimensions.width += 1;
     this.adapter.css(this.container, {
       width: "" + this.dimensions.width + "px",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions