diff --git a/src/commandViews.js b/src/commandViews.js index 7318bc12..25f1a82b 100644 --- a/src/commandViews.js +++ b/src/commandViews.js @@ -77,6 +77,8 @@ var CommandPromptView = Backbone.View.extend({ // now mutate the cursor... this.cursorUpdate(el.value.length, el.selectionStart, el.selectionEnd); + // and scroll down due to some weird bug + events.trigger('commandScrollDown'); }, cursorUpdate: function(commandLength, selectionStart, selectionEnd) { @@ -234,6 +236,7 @@ var CommandLineHistoryView = Backbone.View.extend({ this.collection.on('change', this.scrollDown, this); events.on('issueWarning', this.addWarning, this); + events.on('commandScrollDown', this.scrollDown, this); }, addWarning: function(msg) { @@ -256,6 +259,9 @@ var CommandLineHistoryView = Backbone.View.extend({ var t = $('#terminal')[0]; if ($(t).hasClass('scrolling')) { + console.log('scrolling'); + console.log(t.scrollHeight); + console.log(t.scrollTop); t.scrollTop = t.scrollHeight; return; } diff --git a/src/style/main.css b/src/style/main.css index d833fccf..6a0565b6 100644 --- a/src/style/main.css +++ b/src/style/main.css @@ -281,20 +281,23 @@ p.commandLine span.prompt { } #prompt span.cursor { + /* + ARGHHHhh why does this cause reflows / scrolls!?!?!? wtf -webkit-animation-name: blink; -webkit-animation-duration: 1s; - -webkit-animation-iteration-count: 99999; + -webkit-animation-iteration-count: 99999; */ background: #DDD; position: relative; + opacity: 0.7; } @-webkit-keyframes blink { from { - opacity: 1; + opacity: 0.7; } 49% { - opacity: 1; + opacity: 0.7; } 50% { @@ -305,7 +308,7 @@ p.commandLine span.prompt { opacity: 0; } to { - opacity: 1; + opacity: 0.7; } }