Closed Bug 459478 Opened 11 years ago Closed 10 years ago

Tooltips in main view don't work anymore


(Calendar :: Calendar Views, defect)

Windows Vista
Not set


(Not tracked)



(Reporter: omarb.public, Assigned: martinschroeder)




(1 file)

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b2pre) Gecko/20081010 Calendar/1.0pre
1) Create a new profile
2) Create a new event
3) Move a mouse over the event

Tooltips don't show anything
Flags: blocking-calendar1.0?
Works for me using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081011 Calendar/1.0pre (BuildID: 20081011023826).
Duplicate of this bug: 475253
Duplicate of this bug: 471449
Could someone test the same build on e.g. Windows XP and Windows Vista? Based on the duplicates it seems to be a Vista-only issue.
Keywords: qawanted
I'm using Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b3pre) Gecko/20090222 Calendar/1.0pre and I have the problem.
I tried to do some tests and found that it looks like there is a check for length and words as this won't work:
but 2 words, same length, will:
1234567890123456789012345 678901234567890123456789
The problem is in file mouseoverPreviews.js in function setToolTipContent in two assignment lines:  

    var width = holderBox.boxObject.width;
    var height = holderBox.boxObject.height;

Both holderBox.boxObject.height and holderBox.boxObject.width are very often returning zero, when they should return non-zero. 

When this happens seems to depend on a combination of the length of the text in the event title, the length of the text in event body, the presence of white space, and the presence of line wraps.

Commenting out the last line of this function solves the problem:

    // toolTip.sizeTo(width, height);

My platform is Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b3pre) Gecko/20090223 Lightning/1.0pre Thunderbird/3.0b2.
Correction, TWO lines need commenting out in function setToolTipContent, to solve the problem on my platform (Vista 64-bit):

    // toolTip.sizeTo(0, 0);

    // toolTip.sizeTo(width, height);
This still doesn't explain why it happens only on Windows Vista but not on Windows XP for example. The Lightning source code is identical for both platforms. I think this might be an issue in the underlying mozilla toolkit.
I agree this could be an issue in the underlying mozilla toolkit.  My point really was that there is an easy workaround to get the Tooltips working for Vista users.  In fact, I now have an extension which fixes (works around) this problem and also fixes (works around) the text rendering problem for event box times and titles (see Bugs 474607 & 476620).
We need to find out if the tooltip size issues that caused us to introduce the sizeTo hacks are fixed on 1.9.1. Please find the corresponding bugs (i.e use cvs blame/ hg annontate) and verify.
If it helps, there are references to two bugs in mouseoverPreviews.js:

  // workaround bug 369225 (aspect: tooltip may not shrink height)
  toolTip.sizeTo(0, 0);

  toolTip.appendChild( holderBox );
  var width = holderBox.boxObject.width;
  var height = holderBox.boxObject.height;

  // workaround bug 369225 (aspect: tooltip height too short)
  // Add top and bottom border and padding to workaround bug where bottom
  // tooltip border disappears if wrapped description below header grid.
  height += 1 + 2 + 2 + 1;

  // workaround bug 390313 (aspect: tooltip width too short)
  width += 6;

  toolTip.sizeTo(width, height);

FWIW, after I commented out those two toolTip.sizeTo statements as per Dave's instructions, tooltips work fine again for me in Vista.  They also work in XP Classic Theme (not sure about Luna theme) after I commented out those two statements on my XP box.

(Thunderbird 3.0b2 / Lightning 1.0pre 2009-03-28)
Calendar Tweaks add-on ( fixes the problem.
Attached patch Patch v1Splinter Review
With this patch, I still see no problems on Windows XP. We need some Mac, Linux, and most important Windows Vista users who can check if this patch doesn't mess up showing tooltips (and helps to show them on Vista).
Assignee: nobody → mschroeder
Attachment #385586 - Flags: review?(philipp)
For reference, try builds are available at:

I'll see if I can check this on vista and linux soon, I'd appreciate if someone else could do mac, especially since the mac builder is currently down.
Comment on attachment 385586 [details] [diff] [review]
Patch v1

>+            while (aToolTip.hasChildNodes()) {
>+                aToolTip.removeChild(aToolTip.firstChild);
>+            }
Don't we have a removeChildren() function somewhere? If not, please create one.

r=philipp codewise, we should test this before checkin though
Attachment #385586 - Flags: review?(philipp) → review+
Pushed to comm-central <> including usage of removeChildren() from calendar-ui-utils.js.


To everyone: Please, try to verify all tooltip issues are gone on your preferred OS, and comment on this bug report in any case.
Closed: 10 years ago
Flags: blocking-calendar1.0?
Resolution: --- → FIXED
Target Milestone: --- → 1.0
Tested this in Windows Vista with the classic theme, the Aero theme, and all sorts of variants like High Contrast, Windows Standard, etc. Works fine.
Flags: in-litmus?
Keywords: qawanted
These bugs are likely targeted at Lightning 1.0b1, not Lightning 1.0. If this change was done in error, please adjust the target milestone to its correct value. To filter on this bugspam, you can use "lightning-10-target-move".
Target Milestone: 1.0 → 1.0b1
Flags: in-litmus?
You need to log in before you can comment on or make changes to this bug.