Edgewall Software
Modify

Opened 12 years ago

Closed 7 years ago

#10845 closed defect (worksforme)

textarea#field-description renders incorrectly in Chrome when JS wikitoolbar is absent

Reported by: Ethan Jucovy <ethan.jucovy@…> Owned by:
Priority: normal Milestone:
Component: rendering Version: 0.12.5
Severity: normal Keywords: chrome firefox
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When Javascript is disabled, the "description" textarea is rendered much too widely in Google Chrome, which makes the gray "properties" box no longer centered evenly on the page. When Javascript is disabled, the same textarea is also rendered on top of the label#field-description-help that precedes it, causing that label to be completely hidden from the user's view.

For reasons I don't understand, the width problem (but not the hidden-label problem) can be fixed by either wrapping the textarea in a div, or inserting any div right before the textarea.

This problem is therefore suppressed when Javascript is enabled, because wikitoolbar.js inserts a <div class="wikitoolbar"> just before the description textarea. This causes the textarea's width to be rendered correctly, and also prevents the textarea from hiding its label. So, the problem would also appear with Javascript enabled, if the wikitoolbar.js file is not loaded for any reason (like #10837)

Tested on Google Chrome v21.0.1180.89 on Ubuntu 11.04 and Mac OS X 10.7.4 with Javascript disabled.

The width problem does not seem to be the same on Firefox v15.0 — in that browser the textarea is always slightly too wide, with or without Javascript enabled. (But when Javascript is disabled, the label is hidden in Firefox as well.) I'm guessing this is caused by the same problem, or would at least be fixed by the same CSS/markup solution.

Screenshots of the problem are attached, for Chrome (without JS) and Firefox (with JS).

Attachments (2)

chrome-nojs-description-too-wide.png (91.7 KB ) - added by Ethan Jucovy <ethan.jucovy@…> 12 years ago.
firefox-with-js-description-too-wide.png (113.0 KB ) - added by Ethan Jucovy <ethan.jucovy@…> 12 years ago.

Download all attachments as: .zip

Change History (10)

by Ethan Jucovy <ethan.jucovy@…>, 12 years ago

by Ethan Jucovy <ethan.jucovy@…>, 12 years ago

comment:1 by Remy Blank, 12 years ago

The issue on Firefox is likely due to the size="70" attribute of the full-width text input fields (in this case the "Summary" field). Try reducing it to size="60" and the width should be fine again (except for the field itself, of course). We should try and find a way to make the text input fields full-width without using size=.

The disappearing help text is due to its being float: right, so it doesn't take any vertical space, and when the wiki toolbar goes away, it gets hidden.

For the issue on Chrome, I have no idea yet.

in reply to:  1 comment:2 by Ethan Jucovy <ethan.jucovy@…>, 12 years ago

Slight correction:

So, the problem would also appear with Javascript enabled, if the wikitoolbar.js file is not loaded for any reason (like #10837)

The resizer.js code also wraps the textarea in some divs when it's loaded, so in order to see the problem without disabling Javascript altogether, you need to set resizable_textareas = false as well as disabling the wikitoolbar.js code.

comment:3 by Jun Omae, 12 years ago

I found workaround for this. It would display also the help text. Tested with Chrome 22, Firefox 15, IE8, IE8 compatibility mode, Opera 12 and Safari 5.

  • trac/htdocs/css/ticket.css

     
    99
    1010#field-description-help { float: right }
    1111#properties div.trac-resizable, #field-description { width: 100% }
     12/* #10845 Workaround incorrectly rendering on Chrome */
     13#field-description { display: block }
    1214
    1315#ticket {
    1416 background: #ffd;

comment:4 by Jun Omae, 12 years ago

Keywords: chrome added
Milestone: next-minor-0.12.x

comment:5 by Jun Omae, 10 years ago

Keywords: firefox added
Version: 0.12.5

Firefox 30 has the same issue when javascript is disabled on Trac 0.12.5 or [trac] wiki_toolbars = disabled and [trac] resizable_textareas = disabled on 1.0-stable.

comment:6 by Ryan J Ollos, 10 years ago

Milestone: next-minor-0.12.xnext-stable-1.0.x

comment:7 by Ryan J Ollos, 8 years ago

Milestone: next-stable-1.0.xnext-stable-1.2.x

Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.

comment:8 by Ryan J Ollos, 7 years ago

Milestone: next-stable-1.2.x
Resolution: worksforme
Status: newclosed

1.2-stable and trunk don't exhibit the issue with Chrome 60 and FF 55.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.