diff --git a/app/assets/javascripts/discourse/views/composer.js.es6 b/app/assets/javascripts/discourse/views/composer.js.es6
index 325e23f13a7..c62e86f20c9 100644
--- a/app/assets/javascripts/discourse/views/composer.js.es6
+++ b/app/assets/javascripts/discourse/views/composer.js.es6
@@ -63,12 +63,18 @@ var ComposerView = Discourse.View.extend(Ember.Evented, {
resize: function() {
var self = this;
Em.run.scheduleOnce('afterRender', function() {
- if (self.movePanels) {
- var h = $('#reply-control').height() || 0;
- self.movePanels.apply(self, [h + "px"]);
+ var h = $('#reply-control').height() || 0;
+ self.movePanels.apply(self, [h + "px"]);
+
+ // Figure out the size of the fields
+ var $fields = self.$('.composer-fields'),
+ pos = $fields.position();
+
+ if (pos) {
+ self.$('.wmd-controls').css('top', $fields.height() + pos.top + 5);
}
});
- }.observes('model.composeState'),
+ }.observes('model.composeState', 'model.action'),
keyUp: function() {
var controller = this.get('controller');
@@ -103,11 +109,12 @@ var ComposerView = Discourse.View.extend(Ember.Evented, {
_enableResizing: function() {
var $replyControl = $('#reply-control'),
self = this;
+
$replyControl.DivResizer({
- resize: this.resize,
+ resize: this.resize.bind(self),
onDrag: function (sizePx) { self.movePanels.apply(self, [sizePx]); }
});
- afterTransition($replyControl, this.resize);
+ afterTransition($replyControl, this.resize.bind(self));
this.ensureMaximumDimensionForImagesInPreview();
this.set('controller.view', this);
}.on('didInsertElement'),
diff --git a/app/assets/stylesheets/desktop/compose.scss b/app/assets/stylesheets/desktop/compose.scss
index 122eccc8ffa..5379939dc72 100644
--- a/app/assets/stylesheets/desktop/compose.scss
+++ b/app/assets/stylesheets/desktop/compose.scss
@@ -330,13 +330,6 @@
margin-bottom: 10px;
}
-#reply-control.edit-title.private-message {
- .wmd-controls {
- transition: top 0.3s ease;
- top: 140px;
- }
-}
-
#reply-control {
&.hide-preview {
.wmd-controls {