From 373693a1c4419c5fa3b7de567e9cf4a296c0381f Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 23 Jul 2013 15:54:15 +0400 Subject: [PATCH 1/5] fix weird ie8 bug --- lib/ace/keyboard/textinput.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ace/keyboard/textinput.js b/lib/ace/keyboard/textinput.js index 24e0ea05..79202931 100644 --- a/lib/ace/keyboard/textinput.js +++ b/lib/ace/keyboard/textinput.js @@ -176,10 +176,15 @@ var TextInput = function(parentNode, host) { if (inComposition && (!text.value || keytable[e.keyCode])) setTimeout(onCompositionEnd, 0); if ((text.value.charCodeAt(0)||0) < 129) { - return; + return syncProperty.call(); } inComposition ? onCompositionUpdate() : onCompositionStart(); }); + // when user presses backspace after focusing the editor + // propertychange isn't called for the next character + event.addListener(text, "keydown", function (e) { + syncProperty.schedule(50); + }); } var onSelect = function(e) { From 32035f68db41cc69cd4f084070dc61fb211af20e Mon Sep 17 00:00:00 2001 From: Luca Cipriani Date: Thu, 18 Jul 2013 11:06:25 +0200 Subject: [PATCH 2/5] Added CNAME file for redirect of giihubpages --- CNAME | 1 + 1 file changed, 1 insertion(+) create mode 100644 CNAME diff --git a/CNAME b/CNAME new file mode 100644 index 00000000..f43ae7a9 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +ace.ajax.org From 47b30f5db4af9fc3ce97adf5937926ce9f6119a6 Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 23 Jul 2013 16:37:07 +0400 Subject: [PATCH 3/5] update submodules --- build | 2 +- doc/wiki | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build b/build index cf536740..49c348c4 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit cf536740d866276b65cfd351610001c2a841e751 +Subproject commit 49c348c49aab9b705a110a10312a7ca457fab4a9 diff --git a/doc/wiki b/doc/wiki index d93670b4..743d9d01 160000 --- a/doc/wiki +++ b/doc/wiki @@ -1 +1 @@ -Subproject commit d93670b47d776987b38bb2c31777c4e488338fac +Subproject commit 743d9d01185813dae9a37134fe9876da081ffe5b From 73d8eb5898d6118a8b59f60aa5749412a3aade45 Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 23 Jul 2013 19:11:17 +0400 Subject: [PATCH 4/5] do not lose scheduled changes when render is canceled --- lib/ace/virtual_renderer.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js index 9c1efb3b..c5fff639 100644 --- a/lib/ace/virtual_renderer.js +++ b/lib/ace/virtual_renderer.js @@ -335,7 +335,7 @@ var VirtualRenderer = function(container, theme) { // }.bind(this), 500) - if (!this.$size.scrollerHeight) + if (!this.$size.scrollerHeight || (!width && !height)) return this.resizing = 0; if (force) @@ -344,7 +344,7 @@ var VirtualRenderer = function(container, theme) { if (force) this.$renderChanges(changes, true); else - this.$loop.schedule(changes); + this.$loop.schedule(changes || this.$changes); if (this.resizing) this.resizing = 0; @@ -730,15 +730,14 @@ var VirtualRenderer = function(container, theme) { }; this.$renderChanges = function(changes, force) { - if ((!this.session || !this.container.offsetWidth) || (!changes && !force)) { - this.$changes |= changes; - return; - } if (this.$changes) { changes |= this.$changes; this.$changes = 0; } - + if ((!this.session || !this.container.offsetWidth) || (!changes && !force)) { + this.$changes |= changes; + return; + } // this.$logChanges(changes); this._signal("beforeRender"); From 22de40bf6a5f103c2228caed73e631499ffa1931 Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 23 Jul 2013 19:12:24 +0400 Subject: [PATCH 5/5] resize editor only when tab is fully shown --- doc/site/js/main.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/doc/site/js/main.js b/doc/site/js/main.js index f4d2f951..ed9fbff4 100644 --- a/doc/site/js/main.js +++ b/doc/site/js/main.js @@ -75,16 +75,16 @@ $(function() { $('.menu-item a').click(magicClickInterceptor); $('a.argument').click(magicClickInterceptor); - $('a.external').click(function(e) { + $('a.external').click(function(e) { e.preventDefault(); }); - var tabs = $("#tabnav"), - tab_a_selector = "a"; + var tabs = $("#tabnav"), + tab_a_selector = "a"; - var firstLoad = true; + var firstLoad = true; - tabs.find(tab_a_selector).click(function(e) { + tabs.find(tab_a_selector).click(function(e) { e.preventDefault(); if ($(this).attr("href") === "/") { window.location = "http://ace.ajax.org"; @@ -122,14 +122,18 @@ $(function() { } $(this).tab("show"); - embedded_editor.resize(); - editor.resize(); var state = {}; state.nav = $(this).attr("href").substr(1); $.bbq.pushState(state); }); + $('#tabnav a[data-toggle="tab"]').on('shown', function (e) { + $(".tab-content .tab-pane.active .ace_editor").each(function(i, el){ + el.env.onResize(); + }); + }); + $(window).on("hashchange", function(e) { _gaq.push(['_trackPageview',location.pathname + location.search + location.hash]); tabs.each(function() {