mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 20:46:18 +08:00
FIX: Make diffHTML handle external changes (#12821)
Changing the contents of the preview element between two uses of diff.innerHTML did not apply the diff correctly.
This commit is contained in:
parent
765ba1ab2d
commit
2c417338ed
|
@ -422,6 +422,9 @@ export default Component.extend({
|
|||
);
|
||||
|
||||
loadScript("/javascripts/diffhtml.min.js").then(() => {
|
||||
// changing the contents of the preview element between two uses of
|
||||
// diff.innerHTML did not apply the diff correctly
|
||||
window.diff.release(this.element.querySelector(".d-editor-preview"));
|
||||
window.diff.innerHTML(
|
||||
this.element.querySelector(".d-editor-preview"),
|
||||
cookedElement.innerHTML,
|
||||
|
|
Loading…
Reference in New Issue
Block a user