Aller au contenu

Photo

Word Wrap Problems


1 réponse à ce sujet

#1
nightscrawl

nightscrawl
  • Members
  • 7 469 messages

I've had this problem for a while now but I've been hoping it would fix itself. Since the release of Firefox 36.0, when you turn off the formatting options (the "light switch" next to the eraser) in the post edit box the text no longer wraps at the end. I had actually thought that this might be a Firefox issue and ignored it, but on the most recent update to 36.0.3 I've seen that it still remains so I hunted around for a solution.
 
This post on the Mozilla Support website accurately explains the issue and the solution, which has to be fixed by the web admins.
 

That particular form control has:
<textarea id="main_description" name="b[description]" style="white-space: pre;" class="editor field"></textarea>
 
For the first time in Firefox 36, the white-space property is being honored for textarea controls. So there's your trouble: "pre" means Firefox should emulate the preformatted tag, which requires manual line breaks.
 
It would be great if you can convince the site to change this to:
<textarea id="main_description" name="b[description]" style="white-space: pre-wrap;" class="editor field"></textarea>
which is supported by all modern browsers (per the compatibility table here: https://developer.mo...compatibility).
 
But that likely will take some time, so what is the best short-term workaround? I need to think about that a bit.
To manually hack this form control, you can right-click it and choose Inspect Element (Q). This should open the web console to the Inspector in the lower part of the tab. Firefox should highlight the HTML tag I listed first above, and on the right, show the style rules for it. Under "This Element" you can uncheck the box for that rule to have the textarea styled using default rules. But you would need to do this after each time you load the page, which is a hassle.

 

 
I followed this person's instructions to inspect the elements and I found exactly what was stated:

.cke_skin_ips textarea.cke_source {
    font-family: "Courier New",monospace;
    font-size: small;
    background-color: #FFF;
    white-space: pre;

So... please fix :D.



#2
Jesse Reid

Jesse Reid
  • BioWare Employees
  • 998 messages

It should work now, assuming your cache gets cleared.