mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
This reverts commit abac614492.
The CSS selector I was trying to use does not appear to be widely supported.
This commit is contained in:
@@ -770,15 +770,14 @@ export default Controller.extend({
|
|||||||
|
|
||||||
// TODO: This should not happen in model
|
// TODO: This should not happen in model
|
||||||
const imageSizes = {};
|
const imageSizes = {};
|
||||||
document
|
$("#reply-control .d-editor-preview img").each((i, e) => {
|
||||||
.querySelectorAll("#reply-control .d-editor-preview img:not(.onebox img)")
|
const $img = $(e);
|
||||||
.forEach((e) => {
|
const src = $img.prop("src");
|
||||||
const src = e.src;
|
|
||||||
|
|
||||||
if (src && src.length) {
|
if (src && src.length) {
|
||||||
imageSizes[src] = { width: e.width, height: e.height };
|
imageSizes[src] = { width: $img.width(), height: $img.height() };
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const promise = composer
|
const promise = composer
|
||||||
.save({ imageSizes, editReason: this.editReason })
|
.save({ imageSizes, editReason: this.editReason })
|
||||||
|
|||||||
Reference in New Issue
Block a user