Project

General

Profile

Actions

Defect #38915

open

Duplicate spacer id in jsToolBar

Added by Yasu Saku 9 months ago. Updated 9 months ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
Wiki
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
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 9 months ago

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

Also available in: Atom PDF