From bac0b9ede186591b14838c6239cd8ba3e303161e Mon Sep 17 00:00:00 2001 From: Daniel Starling Date: Thu, 17 Sep 2015 17:41:28 -0700 Subject: [PATCH] Fix $$expand not adjusting height inside script-enabled iframe --- docson.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docson.js b/docson.js index 93d7d09..c97a2bf 100644 --- a/docson.js +++ b/docson.js @@ -366,6 +366,11 @@ define(["lib/jquery", "lib/handlebars", "lib/highlight", "lib/jsonpointer", "lib element.get(0).resized = resized; resized(); + // For usage of $$expand via embed, where height can get stuck initially + for(var waitMs in [100, 500, 1000, 2000, 5000]) { + setTimeout(resized, waitMs); + } + if(highlight) { element.find(".json-schema").each(function(k, schemaElement) { highlight.highlightSchema(schemaElement);