diff --git a/src/Sources/Sources.es6 b/src/Sources/Sources.es6 index e193377..0556fc4 100644 --- a/src/Sources/Sources.es6 +++ b/src/Sources/Sources.es6 @@ -204,7 +204,8 @@ export default class Sources extends Tool } _renderJson() { - this._renderHtml(this._jsonTpl()); + // Using cache will keep binding json events to the same elements. + this._renderHtml(this._jsonTpl(), false); var val = this._data.val; @@ -221,9 +222,9 @@ export default class Sources extends Tool { this._renderHtml(this._iframeTpl({src: this._data.val})); } - _renderHtml(html) + _renderHtml(html, cache = true) { - if (html === this._lastHtml) return; + if (cache && html === this._lastHtml) return; this._lastHtml = html; this._$el.html(html); // Need setTimeout to make it work diff --git a/src/style/variable.scss b/src/style/variable.scss index d08a56d..e45a5b1 100644 --- a/src/style/variable.scss +++ b/src/style/variable.scss @@ -8,7 +8,7 @@ $font-size-s: 12px; $font-size-l: 16px; $font-family: 'Helvetica Neue', Helvetica, Arial, sans-seri; -$font-family-code: Consolas, "Liberation Mono", Menlo, Courier, monospace; +$font-family-code: Monaco, MonoSpace; $anim-duration: .3s;