Edgewall Software
Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#11560 closed defect (fixed)

Wiki toolbar should not show on disabled fields

Reported by: Wladimir Palant Owned by: Ryan J Ollos
Priority: normal Milestone: 1.0.2
Component: general Version: 1.1.1dev
Severity: normal Keywords: wikitoolbar
Cc: Branch:
Release Notes:

Wiki toolbar is disabled if textarea is disabled or readonly.

API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos)

wikitoolbar.js currently contains the following initialization code:

$("textarea.wikitext").each(function() { addWikiFormattingToolbar(this) });

This will add the toolbar to all text fields, even the ones that have been disabled using th:BlackMagicTicketTweaksPlugin. Disabled text fields shouldn't have this toolbar however. A simple change to the line above should do:

$("textarea.wikitext:not([disabled])").each(function() { addWikiFormattingToolbar(this) });

Attachments (0)

Change History (9)

comment:1 by anonymous, 10 years ago

Version: 1.1.1dev

comment:2 by Ryan J Ollos, 10 years ago

We've previously discussed not adding the toolbar to disabled textareas, and decided against the change: comment:10:ticket:11069. I've considered disabling the buttons on the toolbar though, to better emphasize that the textarea is disabled.

Version 2, edited 10 years ago by Ryan J Ollos (previous) (next) (diff)

comment:3 by Ryan J Ollos, 10 years ago

Milestone: 1.0.2
Owner: set to Ryan J Ollos
Status: newassigned

comment:4 by Ryan J Ollos, 10 years ago

I think these changes aren't overly useful, but here are some proposed changes: log:rjollos.git:t11560.

When a user had TICKET_ADMIN but not MILESTONE_ADMIN, the textarea on the Manage Milestone page (e.g. /admin/ticket/milestones/milestone1) was disabled, but pressing the toolbar buttons added content to the textarea. This couldn't cause any harmful behaviour since the Save button was also disabled.

comment:5 by Jun Omae, 10 years ago

In [e381ff06/rjollos.git], please don't remove call of focus(). document.selection.createRange() requires focus of the element on Internet Explorer 8 or early.

comment:6 by Ryan J Ollos, 10 years ago

Release Notes: modified (diff)

Okay, I propose to commit just the changes in log:rjollos.git:t11560.2.

comment:7 by Ryan J Ollos, 10 years ago

It seems to be better to use prop: log:rjollos.git:t11560.3.

comment:8 by Ryan J Ollos, 10 years ago

Resolution: fixed
Status: assignedclosed

Committed to 1.0-stable in [12833], merged to trunk in [12834].

comment:9 by Ryan J Ollos, 10 years ago

Description: modified (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos 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.