rn-rich-text-editor 1.2.2 → 1.2.3

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": "rn-rich-text-editor",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "A rich text editor component for React Native",
5
5
  "keywords": [
6
6
  "react-native",
@@ -820,7 +820,9 @@ function createReadOnlyHTML(options = {}) {
820
820
  el.innerHTML = content;
821
821
  var lastH = 0;
822
822
  var sendHeight = function() {
823
- var h = Math.ceil(el.scrollHeight);
823
+ var scrollH = el.scrollHeight;
824
+ var offsetH = el.offsetHeight;
825
+ var h = Math.ceil(Math.max(scrollH, offsetH)) + 8;
824
826
  if (h !== lastH && window.ReactNativeWebView) {
825
827
  lastH = h;
826
828
  window.ReactNativeWebView.postMessage(JSON.stringify({type: 'OFFSET_HEIGHT', data: h}));