From 99d90afe9b999978e47867283b76bd8e23e510b2 Mon Sep 17 00:00:00 2001 From: rcpeters Date: Fri, 29 Apr 2022 17:20:56 -0700 Subject: [PATCH 1/2] fix body nesting issues --- src/index.jsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/index.jsx b/src/index.jsx index 44f4700..0ce0c90 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -54,12 +54,14 @@ export class Recogito { this._wrapperEl.style.position = 'relative'; if (contentEl instanceof HTMLBodyElement) { - this._wrapperEl.append(...contentEl.childNodes); - contentEl.appendChild(this._wrapperEl); - } else { - contentEl.parentNode.insertBefore(this._wrapperEl, contentEl); - this._wrapperEl.appendChild(contentEl); + this._newContentEl = document.createElement('DIV') + this._newContentEl.append(...contentEl.childNodes); + contentEl.append(this._newContentEl); + contentEl = this._newContentEl; } + contentEl.parentNode.insertBefore(this._wrapperEl, contentEl); + this._wrapperEl.appendChild(contentEl); + this._appContainerEl = document.createElement('DIV'); From 6602f7b041e3690fd14f5d1574d979f255a87019 Mon Sep 17 00:00:00 2001 From: rcpeters Date: Sat, 30 Apr 2022 08:04:49 -0700 Subject: [PATCH 2/2] fix double minium height issue --- src/index.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.jsx b/src/index.jsx index 0ce0c90..b749a86 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -50,11 +50,14 @@ export class Recogito { contentEl = deflateHTML(contentEl); this._wrapperEl = document.createElement('DIV'); - this._wrapperEl.className = 'r6o-content-wrapper'; + this._wrapperEl.className = 'r6o-content-wqrapper'; + this._wrapperEl.style='min-height: 100%; height: 100%'; this._wrapperEl.style.position = 'relative'; if (contentEl instanceof HTMLBodyElement) { this._newContentEl = document.createElement('DIV') + this._newContentEl.style='min-height: 100%; height: 100%'; + this._newContentEl.style.position = 'relative'; this._newContentEl.append(...contentEl.childNodes); contentEl.append(this._newContentEl); contentEl = this._newContentEl;