45691 - WebLabel with Font Styles Underline does not show Underline in Browser

I just submitted a Web Bug report: <https://xojo.com/issue/45691> - WebLabel with Font Styles Underline does not show Underline in Browser

Example Project: CampSoftware - Developer of Custom Database Driven Apps

Steps: - Drag a WebLabel to a WebPage.

  • Create a Style with a Font Style set to Underline.
  • Apply the Style to the WebLabel.
  • Run and see the label with no underline.

I didn’t test the other Font Styles, but @Tim Dietrich tried all styles and only Bold and Italic work. Underline, StrikeThru, and the last one do not work.

Expected Result:
The WebLabel to be underline.

Actual Result:
The WebLabel is not underlined.

Have you tried with other browsers?

Thanks for that idea Greg. Just tested and it’s not underlining in Safari, FireFox, and Chrome. I’d assume it not StrikeThru-ing, and one to the right of StrikeThru too.

Hm. I know this worked recently because I used it in a project… I’ll look at the case when I get a sec.

That’s the most bizarre thing I’ve seen. Poking into the running project, the style is clearly set for underline and it’s assigned correctly, but the browser reports the style for the element (text-decoration) as “none”. Then when i ask the browser where it got that value, it points me back to the line where it’s being set to “underline”. hmmm…

I wonder if it’s because someone decided to !important everything and the browser is just as confused :wink:

It may not be so much the fault of !important as the fact that the style is applied to the div that contains the actual HTML text within the control.

This will apply the style to the text inside the control, making underscore el al work :

[code]Sub Shown() Handles Shown
dim js as string

js = “var Tf = document.getElementById(’”+me.controlid+"’);"
js = js + “Tf.getElementsByTagName(‘div’)[0].className = Tf.className;”

End Sub

I just was wondering if this bug that I reported a while back has been fixed, but Font Styles in WebStyles Underline, Strikethru, and Overstrike do not work in Xojo 2018r4. Bold and Italic work!

If Web 2.0 ships at or before XDC 2019, I can live with this not getting fixed.

This has been an issue for a very long time. It was a problem in the very first webedition release. Originally reported by Geoff Perlman on Mar 31, 2011 at 1:49 PM

Im not surprised Greg has not seen it as it predates his employment with Real/Xojo.

To beat a dead horse again: It would be nice of Xojo actually used webEdditon themselves. Things like this would be apparent.