Fix the class attribute of Droppable widget (#4647)

Even though we passed the `class` attribute, it did not take it into
account. For example try to render this:

  <$droppable class="custom-css-class">
    ... content ...
  </$droppable>

Before applying this patch:

  <span class=" tc-droppable">
    ... content ...
  </span>

After applying:

  <span class="custom-css-class tc-droppable">
    ... content ...
  </span>
This commit is contained in:
Bimba Laszlo
2020-05-14 13:55:33 +01:00
committed by GitHub
parent 84a4784dee
commit 9c22537b4e
+1 -1
View File
@@ -39,7 +39,7 @@ DroppableWidget.prototype.render = function(parent,nextSibling) {
}
// Create element and assign classes
var domNode = this.document.createElement(tag),
classes = (this["class"] || "").split(" ");
classes = (this.droppableClass || "").split(" ");
classes.push("tc-droppable");
domNode.className = classes.join(" ");
// Add event handlers