nodebb-plugin-composer-default 10.0.19 → 10.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-composer-default",
3
- "version": "10.0.19",
3
+ "version": "10.0.20",
4
4
  "description": "Default composer for NodeBB",
5
5
  "main": "library.js",
6
6
  "repository": {
@@ -42,7 +42,7 @@ $(document).ready(function () {
42
42
  require(['composer'], function (composer) {
43
43
  composer.newReply({
44
44
  tid: data.tid,
45
- pid: data.pid,
45
+ toPid: data.pid,
46
46
  title: data.topicName,
47
47
  body: data.text,
48
48
  });
@@ -238,7 +238,7 @@ define('composer/drafts', ['api', 'alerts'], function (api, alerts) {
238
238
  };
239
239
 
240
240
  drafts.loadOpen = function () {
241
- if (ajaxify.data.template.login || ajaxify.data.template.register || !config.hasOwnProperty('openDraftsOnPageLoad') || !config.openDraftsOnPageLoad) {
241
+ if (ajaxify.data.template.login || ajaxify.data.template.register || (config.hasOwnProperty('openDraftsOnPageLoad') && !config.openDraftsOnPageLoad)) {
242
242
  return;
243
243
  }
244
244
  // Load drafts if they were open
@@ -11,6 +11,7 @@ define('composer/resize', ['taskbar'], function (taskbar) {
11
11
  var $body = $('body');
12
12
  var $window = $(window);
13
13
  var $headerMenu = $('[component="navbar"]');
14
+ const content = document.getElementById('content');
14
15
 
15
16
  var body = document.body;
16
17
  var header = $headerMenu[0];
@@ -69,10 +70,10 @@ define('composer/resize', ['taskbar'], function (taskbar) {
69
70
  // Add some extra space at the bottom of the body so that
70
71
  // the user can still scroll to the last post w/ composer open
71
72
  var rect = elem.getBoundingClientRect();
72
- body.style.paddingBottom = (rect.bottom - rect.top).toString() + 'px';
73
+ content.style.paddingBottom = (rect.bottom - rect.top).toString() + 'px';
73
74
  } else {
74
75
  postContainer.removeAttr('style');
75
- body.style.paddingBottom = 0;
76
+ content.style.paddingBottom = 0;
76
77
  }
77
78
 
78
79
  postContainer.ratio = ratio;