Edgewall Software

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 Version 1

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 (last modified by Jun Omae)

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):  
    522522            page.readonly = 'readonly' in req.args
    523523
    524524        author = get_reporter_id(req, 'author')
    525         defaults = {'editrows': 20}
     525        defaults = {'editrows': '20'}
    526526        prefs = dict((key, req.session.get('wiki_%s' % key, defaults.get(key)))
    527527                     for key in ('editrows', 'sidebyside'))
    528528

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.

Change History (1)

comment:1 by Jun Omae, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.