Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/xterm.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ Terminal.defaults = {
scrollback: 1000,
screenKeys: false,
debug: false,
cancelEvents: false
cancelEvents: false,
disableStdin: false
// programFeatures: false,
// focusKeys: false,
};
Expand Down Expand Up @@ -3134,6 +3135,11 @@ Terminal.prototype.is = function(term) {
* @param {string} data The data to populate in the event.
*/
Terminal.prototype.handler = function(data) {
// Prevents all events to pty process if stdin is disabled
if (this.options.disableStdin) {
return;
}

// Input is being sent to the terminal, the terminal should focus the prompt.
if (this.ybase !== this.ydisp) {
this.scrollToBottom();
Expand Down