From 55a8babf4f8870b44b427057d190b5819f3d2072 Mon Sep 17 00:00:00 2001 From: benbro Date: Sat, 10 Sep 2016 00:37:33 +0300 Subject: [PATCH] set tooltip bounds container to document.body if undefined fixes #944 --- core/quill.js | 2 +- ui/tooltip.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/quill.js b/core/quill.js index 19cc8111c9..4d0b7c3069 100644 --- a/core/quill.js +++ b/core/quill.js @@ -298,7 +298,7 @@ class Quill { } } Quill.DEFAULTS = { - bounds: document.body, + bounds: null, formats: null, modules: {}, placeholder: '', diff --git a/ui/tooltip.js b/ui/tooltip.js index dc47e4bc8e..951d81d648 100644 --- a/ui/tooltip.js +++ b/ui/tooltip.js @@ -1,7 +1,7 @@ class Tooltip { constructor(quill, boundsContainer) { this.quill = quill; - this.boundsContainer = boundsContainer; + this.boundsContainer = boundsContainer || document.body; this.root = quill.addContainer('ql-tooltip'); this.root.innerHTML = this.constructor.TEMPLATE; let offset = parseInt(window.getComputedStyle(this.root).marginTop);