Actions
Defect #38915
closedDuplicate spacer id in jsToolBar
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
Currently, each spacer in the jsToolBar is assigned an ID.
However, when there are multiple wiki editing areas on a page, this causes issues due to the duplicated IDs.
Therefore, to address this problem, I have created a patch that replaces the ID with a class name as one of the proposed fixes.
--- a/public/javascripts/jstoolbar/jstoolbar.js
+++ b/public/javascripts/jstoolbar/jstoolbar.js
@@ -155,15 +155,14 @@ jsButton.prototype.draw = function() {
return button;
}
-function jsSpace(id) {
- this.id = id || null;
+function jsSpace(className) {
+ this.className = className || null;
this.width = null;
}
jsSpace.prototype.draw = function() {
var span = document.createElement('span');
- if (this.id) span.id = this.id;
span.appendChild(document.createTextNode(String.fromCharCode(160)));
- span.className = 'jstSpacer';
+ span.className = 'jstSpacer' + (this.className ? ' ' + this.className : '');
if (this.width) span.style.marginRight = this.width+'px';
return span;
Updated by Go MAEDA over 1 year ago
- Status changed from New to Confirmed
- Target version set to Candidate for next major release
Updated by Marius BĂLTEANU about 2 months ago
- Status changed from Confirmed to Resolved
- Assignee set to Marius BĂLTEANU
- Resolution set to Fixed
I've committed the fix, thanks!
Updated by Marius BĂLTEANU about 2 months ago
- Status changed from Resolved to Closed
Actions