Compare commits

...
3 Commits
Author SHA1 Message Date
paris e278837de8 Fix focus on refresh 2014-04-09 16:49:29 +00:00
paris e572734a21 Syntax fix
Bumped bower version to 0.5
2014-04-09 15:42:37 +00:00
paris 4f2cadd6c9 Fixed paste
Bumped bower version to 0.4
2014-04-09 15:37:45 +00:00
3 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "xterm.js",
"version": "0.3",
"version": "0.6",
"ignore": ["demo", "docs", "test", ".gitignore"]
}
-1
View File
@@ -1 +0,0 @@
/mnt/project/
+5 -2
View File
@@ -419,7 +419,6 @@ Terminal.bindPaste = function(term) {
ev.stopPropagation();
if (ev.clipboardData) {
var text = ev.clipboardData.getData('text/plain');
term.write(text);
term.handler(text);
}
term.textarea.value = '';
@@ -954,7 +953,7 @@ Terminal.prototype.destroy = function() {
* 1=bold, 2=underline, 4=blink, 8=inverse, 16=invisible
*/
Terminal.prototype.refresh = function(start, end) {
var x, y, i, line, out, ch, width, data, attr, bg, fg, flags, row, parent;
var x, y, i, line, out, ch, width, data, attr, bg, fg, flags, row, parent, focused = document.activeElement;
if (end - start >= this.rows / 2) {
parent = this.element.parentNode;
@@ -1087,6 +1086,10 @@ Terminal.prototype.refresh = function(start, end) {
parent.appendChild(this.element);
}
/*
* Return focus to previously focused element
*/
focused.focus();
this.emit('refresh', {element: this.element, start: start, end: end});
};