Skip to content

A platform for community discussion. Free, open, simple.

FIX: place image scale buttons unconditionally

Sam Saffron001c593155e8
diff --git a/app/assets/javascripts/discourse/components/composer-editor.js.es6 b/app/assets/javascripts/discourse/components/composer-editor.js.es6
index 0709dc9c5f0..cc419e1af90 100644
--- a/app/assets/javascripts/discourse/components/composer-editor.js.es6
+++ b/app/assets/javascripts/discourse/components/composer-editor.js.es6
@@ -202,14 +202,6 @@ export default Component.extend({
);
}
- if (!this.site.mobileView) {
- $preview
- .off("touchstart mouseenter", "img")
- .on("touchstart mouseenter", "img", () => {
- this._placeImageScaleButtons($preview);
- });
- }
-
// Focus on the body unless we have a title
if (
!this.get("composer.canEditTitle") &&
@@ -928,8 +920,6 @@ export default Component.extend({
},
showPreview() {
- const $preview = $(this.element.querySelector(".d-editor-preview-wrapper"));
- this._placeImageScaleButtons($preview);
this.send("togglePreview");
},
@@ -1078,9 +1068,7 @@ export default Component.extend({
);
}
- if (this.site.mobileView && $preview.is(":visible")) {
- this._placeImageScaleButtons($preview);
- }
+ this._placeImageScaleButtons($preview);
this.trigger("previewRefreshed", $preview);
this.afterRefresh($preview);