From 78b991d760d52311c09287a2e20270c83c069b6c Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 19 Feb 2015 13:55:36 +0100 Subject: YosysJS firefox fixes --- misc/yosysjs/yosysjs.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'misc/yosysjs/yosysjs.js') diff --git a/misc/yosysjs/yosysjs.js b/misc/yosysjs/yosysjs.js index a1181493e..b0205bf61 100644 --- a/misc/yosysjs/yosysjs.js +++ b/misc/yosysjs/yosysjs.js @@ -137,8 +137,11 @@ var YosysJS = new function() { span.textContent = text + "\n"; span.style.fontFamily = 'monospace'; span.style.whiteSpace = 'pre'; - doc.body.appendChild(span); - ys.window.scrollTo(0, doc.body.scrollHeight) + doc.firstChild.appendChild(span); + if (doc.body) + ys.window.scrollTo(0, doc.body.scrollHeight); + else + ys.window.scrollBy(0, 100); } ys.prompt = function() { -- cgit v1.2.3