[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1026
  • Last Modified:

Displaying tooltip which contains new line character for <a> in Netscape failed

Hi all,

I have page1 including a textarea to input data. When users input data into this textarea with content:
aaaa
bbbb
In the page2, I get this value and display it as a tooltip of <a>. However when users mouse over on <a>, tooltip displays between aaaa and bbbb is a rectangle.
It only occurs on Netscape.

Thanks for your helps.
 
0
dtdphuc
Asked:
dtdphuc
  • 4
  • 3
  • 2
  • +1
1 Solution
 
dorwardCommented:
Different browsers handle line breaks in the middle of title attributes differently. There is no work around AFAIK so you should avoid placing line breaks in title attraibute values.
0
 
dtdphucAuthor Commented:
Which ways can I fix it? I must fix it (can not avoid).
0
 
dorwardCommented:
As far as I know, and as I said before, there is no fix.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
dtdphucAuthor Commented:
Is this a browser's bug?
0
 
dorwardCommented:
Perhaps, you would have to check with the specifcation to be sure. It might be that line breaks should be treated as white space for the attribute value of title.

However, I think that those two browsers actually get it right. One can show multiline tooltips and does so, the other can't and shows the new line as an unprintable character.
0
 
HaydnHCommented:
Please could you post a link to the code, or the code itself.

Thanks,

Haydn.
0
 
dorwardCommented:
title="aaaa
bbbb"

I assume.
0
 
ahosangCommented:
can't test now but you could try using the entity:
&#10;
to act as the line break
0
 
HaydnHCommented:
ahosang,

that will only work with IE, the 2 rectangles shown in the tooltip when a new line is found is the same as &#10;&#13;

Haydn.
0
 
HaydnHCommented:
Ahh... it's a Mozilla/Netscape Bug I'm afraid - first 1 I've found with the latest Mozilla release (grrrr!), see:

    http://bugzilla.mozilla.org/show_bug.cgi?id=67127

Looks like they're making progress on the patch so I guess it will be finished by the next release.

Haydn.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 4
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now