#11799 closed defect (fixed)
First entry 8 is selected in dropdown for rows of textarea in wiki edit page by default
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.3 |
Component: | wiki system | Version: | 0.12-stable |
Severity: | minor | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Select |
||
API Changes: | |||
Internal Changes: |
Description (last modified by )
When a user which its session is empty, in wiki edit page, first entry 8 is selected in dropdown for height of textarea. However, height of the textarea is 20 rows.
Pressing preview button after this, the height will be 8 rows and "8" will be stored in session. The behavior is annoying me. That is introduced in [8888#file3].
-
trac/wiki/web_ui.py
diff --git a/trac/wiki/web_ui.py b/trac/wiki/web_ui.py index 94e8bfc..f1af122 100644
a b class WikiModule(Component): 522 522 page.readonly = 'readonly' in req.args 523 523 524 524 author = get_reporter_id(req, 'author') 525 defaults = {'editrows': 20}525 defaults = {'editrows': '20'} 526 526 prefs = dict((key, req.session.get('wiki_%s' % key, defaults.get(key))) 527 527 for key in ('editrows', 'sidebyside')) 528 528
Also, the selected rows isn't stored in the user's session when the page is saved. However, if submitting changes and the changes collide against another changes, the rows will be incongruously stored in the session. See tags/trac-1.0.2/trac/wiki/web_ui.py@:155-159#L143 and tags/trac-1.0.2/trac/wiki/web_ui.py@:543-544#L529.
I think the rows should be stored even if submitting changes.
Attachments (0)
Change History (7)
comment:1 by , 10 years ago
Description: | modified (diff) |
---|
comment:2 by , 10 years ago
comment:3 by , 10 years ago
Owner: | set to |
---|---|
Release Notes: | modified (diff) |
Status: | new → assigned |
Thanks for the feedback. Fixed in [13204] and merged to trunk in [13205].
For 0.12.x users, please try th:TracFewFixesPlugin.
comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:5 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I notice that the same issue occurs if toggling from Edit side-by-side mode on 1.0-stable. I'll fix here.
comment:6 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Ouch, comment:5 is not right. I've used 1.0.2 without the patch in description. Re-closing.
comment:7 by , 10 years ago
Release Notes: | modified (diff) |
---|
Replying to jomae:
Thanks, I've felt some strange behavior here before but never stopped to study it. The patch looks good to me.