mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 17:00:04 +02:00
scrolling fixed, no moreblinking cursor
This commit is contained in:
parent
1bbdb5d6a0
commit
b22f439a43
2 changed files with 13 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue