Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#15299 closed defect (fixed)

Tooltip: unnecessarily splits text to two lines (IE9)

Reported by: skamaraj Owned by: bill
Priority: undecided Milestone: 1.8.7
Component: Dijit Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

dijit tool tips look different in IE9. IE seems to wrap the title to new line when it is unexpected.

Following link shows the problem

http://jsfiddle.net/VQwtB/5/

Notice that chrome and IE do not behave in the same way. The Tooltip's domGeometry.getContentBox(this.domNode) does not return the size consistently across the browsers.

Attachments (3)

tooltipSize.patch (971 bytes) - added by bill 7 years ago.
avoid IE bug by not setting width unless absolutely necessary; but this breaks tooltip placement when viewport scrolled to the right
28532_17.patch (1.5 KB) - added by haysmark 7 years ago.
Backport to 1.7, but regresses test_Tooltip.
tooltip.html (813 bytes) - added by haysmark 7 years ago.
Test case.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 7 years ago by bill

Milestone: tbd1.8
Owner: set to bill
Status: newassigned
Summary: Tool tips look different on IE9Tooltip: unnecessarily splits text to two lines (IE9)

comment:2 Changed 7 years ago by bill

This is caused by an IE9 bug which I filed at http://answers.microsoft.com/en-us/ie/forum/ie9-windows_7/setting-divwidth-to-offsetwidth-causes-word-wrap/e3024e81-21ce-43b5-b08a-0cc0358654d6, although it's doubtful I'll get a useful response.

One solution is to not set the Tooltip's width except when necessary to keep it from overflowing the screen. However, that causes other problems when the viewport has a horizontal scrollbar, and it's scrolled to the right, and the tooltip is over a node on the right: both IE and FF will truncate the width of the node as though the viewport were scrolled all the way to the left. (This is tested in Tooltip-placement.html, although it's debatable whether we need to support that case.)

Changed 7 years ago by bill

Attachment: tooltipSize.patch added

avoid IE bug by not setting width unless absolutely necessary; but this breaks tooltip placement when viewport scrolled to the right

comment:3 Changed 7 years ago by bill

Resolution: fixed
Status: assignedclosed

In [28532]:

The change in [22969] causes a slight problem on IE9 where tooltip text is unnecessarily split across two lines. So, add a few pixels.

Also fixing unnecessary manual adjustment for connector width. It's included in the the width of Tooltip.domNode.

Seems like all the browser sniff tests in this file could be changed to "feature tests", but I will leave that for a different checkin.

Fixes #15299 !strict.

Changed 7 years ago by haysmark

Attachment: 28532_17.patch added

Backport to 1.7, but regresses test_Tooltip.

Changed 7 years ago by haysmark

Attachment: tooltip.html added

Test case.

comment:4 Changed 7 years ago by haysmark

I tried to backport this change to 1.6/1.7 but am encountering difficulties. The attached patch fixes the attached tooltip.html test case. However, in our dijit test_Tooltip, if you move your mouse over the tooltip on the far right, it takes up even more lines instead of less (it should take 2, takes 3 right now, takes like 5 with the patch).

I noticed a lot of the sizing logic had changed since 1.7 to the extent that the context lines in the diff didn't match; I was wondering if there are any additional changes required for this to work.

comment:5 Changed 7 years ago by bill

Hmm, yeah I'm not sure. There was a bunch of code that went in at some point to position the arrow connector directly to where the anchor node is. Theoretically unrelated.

This isn't a critical bug to backport since it's just a rendering glitch, although customers may still scream about it.

comment:6 Changed 5 years ago by Bill Keese <bill@…>

In 6e68e6c35dc61636eca0442898351ecbc09e1960/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:7 Changed 5 years ago by Bill Keese <bill@…>

In 97535f7b7c101424823c5e0c80f22ec1776e6a40/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:8 Changed 5 years ago by Bill Keese <bill@…>

In c9127dc01b812001e584cbc52a1a1690a77a8751/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:9 Changed 5 years ago by bill

Milestone: 1.81.8.7
Note: See TracTickets for help on using tickets.