Opened 9 years ago
Last modified 9 years ago
#11799 closed defect
First entry 8 is selected in dropdown for rows of textarea in wiki edit page by default — at Initial Version
Reported by: | Jun Omae | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.3 |
Component: | wiki system | Version: | 0.12-stable |
Severity: | minor | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
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.
-
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.
I think the rows should be stored even if submitting changes.