x/pkgsite: example code doesn't display without JavaScript #46302
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
pkgsite
Milestone
When JavaScript is disabled the examples aren't loaded properly, although the example output does show. For example at https://pkg.go.dev/golang.org/x/text@v0.3.6/message#example-Printer-MVerb :
Because it has
overflow: hidden
andresize: none
there's no way to scroll or do anything with that.From what I can find in a quick search, automatically sizing a textarea height to fit the content isn't really possible without JavaScript; but at least removing those two attributes makes it usable, albeit awkward, instead of completely unusable as it is now.
The Best Way™ would of course be to just output a
<pre>
tag and then overwrite that with a fancy textarea in JavaScript.This is in Firefox on Linux, but it should display the same problem in any browser AFAIK.
The text was updated successfully, but these errors were encountered: