Project

General

Profile

Actions

Defect #38915

closed

Duplicate spacer id in jsToolBar

Added by Yasu Saku over 1 year ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Category:
UI
Target version:
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;

Actions #1

Updated by Go MAEDA over 1 year ago

  • Status changed from New to Confirmed
  • Target version set to Candidate for next major release
Actions #2

Updated by Go MAEDA 2 months 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.

Actions #3

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!

Actions #4

Updated by Marius BĂLTEANU about 2 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF