#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 |
||
API Changes: | |||
Internal Changes: |
Description (last modified by )
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 , 11 years ago
Version: | → 1.1.1dev |
---|
comment:3 by , 11 years ago
Milestone: | → 1.0.2 |
---|---|
Owner: | set to |
Status: | new → assigned |
comment:4 by , 11 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 , 11 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 , 11 years ago
Release Notes: | modified (diff) |
---|
Okay, I propose to commit just the changes in log:rjollos.git:t11560.2.
comment:8 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:9 by , 11 years ago
Description: | modified (diff) |
---|
We've previously discussed not adding the toolbar to disabled textareas, and decided to keep the current behavior: comment:10:ticket:11069. I've considered disabling the buttons on the toolbar though, to better emphasize that the textarea is disabled.