mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:19:27 +08: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:
parent
648d2fd793
commit
b57dca90fc
|
@ -770,15 +770,14 @@ export default Controller.extend({
|
|||
|
||||
// TODO: This should not happen in model
|
||||
const imageSizes = {};
|
||||
document
|
||||
.querySelectorAll("#reply-control .d-editor-preview img:not(.onebox img)")
|
||||
.forEach((e) => {
|
||||
const src = e.src;
|
||||
$("#reply-control .d-editor-preview img").each((i, e) => {
|
||||
const $img = $(e);
|
||||
const src = $img.prop("src");
|
||||
|
||||
if (src && src.length) {
|
||||
imageSizes[src] = { width: e.width, height: e.height };
|
||||
}
|
||||
});
|
||||
if (src && src.length) {
|
||||
imageSizes[src] = { width: $img.width(), height: $img.height() };
|
||||
}
|
||||
});
|
||||
|
||||
const promise = composer
|
||||
.save({ imageSizes, editReason: this.editReason })
|
||||
|
|
Loading…
Reference in New Issue
Block a user