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 Go MAEDA about 1 month ago
- Category changed from Wiki to UI
- Target version changed from Candidate for next major release to 6.0.0
Setting the target version to 6.0.0.
Updated by Marius BĂLTEANU 22 days ago
- Status changed from Confirmed to Resolved
- Assignee set to Marius BĂLTEANU
- Resolution set to Fixed
I've committed the fix, thanks!
Actions