Fix creating comments on Firefox ESF
Use the slot attribute instead of property - on browsers that do not have native Shadow DOM support, the slot property does not exist and setting it will be ignored. Change-Id: Ifac4a48aba0847630990fef800e7f9d60f57c931
This commit is contained in:
@@ -632,7 +632,7 @@
|
|||||||
_createThreadElement(thread) {
|
_createThreadElement(thread) {
|
||||||
const threadEl = document.createElement('gr-comment-thread');
|
const threadEl = document.createElement('gr-comment-thread');
|
||||||
threadEl.className = 'comment-thread';
|
threadEl.className = 'comment-thread';
|
||||||
threadEl.slot = `${thread.commentSide}-${thread.lineNum}`;
|
threadEl.setAttribute('slot', `${thread.commentSide}-${thread.lineNum}`);
|
||||||
threadEl.comments = thread.comments;
|
threadEl.comments = thread.comments;
|
||||||
threadEl.commentSide = thread.commentSide;
|
threadEl.commentSide = thread.commentSide;
|
||||||
threadEl.isOnParent = !!thread.isOnParent;
|
threadEl.isOnParent = !!thread.isOnParent;
|
||||||
|
@@ -775,7 +775,7 @@
|
|||||||
// that is okay because the first matching slot is used and the rest
|
// that is okay because the first matching slot is used and the rest
|
||||||
// are ignored.
|
// are ignored.
|
||||||
const slot = document.createElement('slot');
|
const slot = document.createElement('slot');
|
||||||
slot.name = threadEl.slot;
|
slot.name = threadEl.getAttribute('slot');
|
||||||
Polymer.dom(threadGroupEl).appendChild(Gerrit.slotToContent(slot));
|
Polymer.dom(threadGroupEl).appendChild(Gerrit.slotToContent(slot));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user