3.2.0

Text wrap problem in FireFox

Hi Alex,

I'm using Firefox 3.5.3 with the example code given below.
If you initially load the page, the second column appears blank.
If you resize the second column to increase its width, the text shows up.
In other browsers, the long text of the email address is truncated, but in Firefox, it seems to disappear from the cell if the cell width is small.
Do you have any solution for this problem ?

Thanks,
Ankur

<script>

    var obj = new AW.Grid.Extended;
    obj.setCellText(["multi line<br>cell", "VeryLongEmailAddress@DomainName.com<br>a@a.com", "cell", "cell", "cell", "cell", "cell", "cell", "cell", "cell"]);
    obj.setHeaderText(["header", "problem", "header", "header", "header", "header", "header", "header", "header", "header"]);
    obj.setColumnCount(10);
    obj.setRowCount(10);

    obj.setRowHeight(40);
    obj.getRowTemplate().setClass("text", "wrap");
    obj.setCellTemplate(new AW.Templates.ImageText);

    document.write(obj);

</script>
Ankur Motreja
September 17,
I'm not sure if this will help. Found a problem with Google Chrome truncating the header text (added ellipses) while the header text was fine in IE and FF.

Ended up adding the style "text-overflow:clip" which fixed the problem.
Anthony
September 18,
Hi Anthony,

Thanks for taking a look.
I forgot to mention that the problem occurs only in Firefox and not in IE, Opera, Safari and Google Chrome.
I tried adding text-overflow:clip at a few places and then figured out that its not supported in Firefox.
So, I don't think text-overflow will be able to fix this issue.

Thanks,
Ankur

Ankur Motreja
September 18,
Yes, you're right! It says its unimplemented. https://developer.mozilla.org/en/CSS/text-overflow

Anthony
September 18,
I thought I'd take a closer look at this. It doesn't happen with FF 2.0 and FF 3.0. So its an artefact of FF 3.5. I also tried Opera (9 & 10) and it doesn't handle the increased row height (so no text wrap). Other browsers I checked were OK.
Anthony
September 20,
Hi Anthony,

Are you sure about it not working in Opera ?
I tried it in Opera 9.64 and it seems to handle the row height and text wrap fine.
I'll be installing Opera 10 soon and will check in that too.

The Firefox version thing is an interesting find.
But, I can't think of any way to fix it in FF3.5.
Lets see if Alex has any ideas.

Thanks,
Ankur
Ankur Motreja
September 20,
Hmm ... I'm not entirely sure now. I remember removing the setRowHeight(40) line to see it made any difference. But I don't recall now if it was before or after I tested the code with Opera. I'm pretty sure it was after but I was checking the problem against FF too, so it might have been before and I'm misremembering.

There are Mozilla support and discussion newsgroups at news.mozilla.org You could raise this in the mozilla.support.firefox newsgroup as well.
Anthony
September 20,
This should fix the issue in Firefox -

.aw-text-wrap .aw-item-text {
    max-width: 100%;
}
Alex (ActiveWidgets)
September 21,
Hi Alex,

Thank you.
With that, it works perfectly in all browsers.

Thanks,
Ankur
Ankur Motreja
September 21,
Fixed in AW 2.5.5 -
http://www.activewidgets.com/general.bugs/2-5-5.html
Alex (ActiveWidgets)
September 25,

This topic is archived.

See also:


Back to support forum