From 57c40a8a5676528c009da0d3f10ad32f4ec2ffba Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 22 Sep 2015 12:57:53 +0200 Subject: [PATCH] Text-slicer: Tweaks to fix recently introduced bugs! * Fixes problem with slicing wikitext tiddlers * Adjusts position of heading expand/collapse icons in the view template segment --- core/modules/utils/fakedom.js | 6 ++++++ plugins/tiddlywiki/text-slicer/styles.tid | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/modules/utils/fakedom.js b/core/modules/utils/fakedom.js index 8ca1fcb04..85f57a503 100755 --- a/core/modules/utils/fakedom.js +++ b/core/modules/utils/fakedom.js @@ -26,6 +26,12 @@ var TW_TextNode = function(text) { this.textContent = text; }; +Object.defineProperty(TW_TextNode.prototype, "nodeType", { + get: function() { + return 3; + } +}); + Object.defineProperty(TW_TextNode.prototype, "formattedTextContent", { get: function() { return this.textContent.replace(/(\r?\n)/g,""); diff --git a/plugins/tiddlywiki/text-slicer/styles.tid b/plugins/tiddlywiki/text-slicer/styles.tid index 311c645dc..cf74a4653 100644 --- a/plugins/tiddlywiki/text-slicer/styles.tid +++ b/plugins/tiddlywiki/text-slicer/styles.tid @@ -75,6 +75,7 @@ tags: $:/tags/Stylesheet } .tc-tiddler-frame .tc-document-tiddler-toolbar { - left: 52px; + left: 0; + width: 42px; }