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 +1 -1
- package/src/editor/createHTML.js +3 -1
package/package.json
CHANGED
package/src/editor/createHTML.js
CHANGED
|
@@ -820,7 +820,9 @@ function createReadOnlyHTML(options = {}) {
|
|
|
820
820
|
el.innerHTML = content;
|
|
821
821
|
var lastH = 0;
|
|
822
822
|
var sendHeight = function() {
|
|
823
|
-
var
|
|
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}));
|