Joe Bierman
Joe Bierman

Reputation: 11

How to remove the autofocus feature from JQuery Terminal Plugin?

I'm making a basic HTML page that contains a JQuery Terminal that is located just beneath the first visible window, so you essentially just scroll down and then you can see the terminal.

My issue is that when my window loads, it always snaps the focus to the terminal instead of at the top of the page, so you have to scroll up to see the content that you're supposed to see on load.

What's the best way to fix this?

Upvotes: 0

Views: 131

Answers (1)

jcubic
jcubic

Reputation: 66490

jQuery Terminal is enabled by default. Which, because of hidden textarea or content editable on mobile, will always jump to the terminal if it's part of the bigger page and not a full-screen terminal.

To disabled this behavior use this:

$('#term').terminal(interpreter, {
   enabled: false
});

You can see this on jQuery Terminal Website code index.php#L567

Upvotes: 0

Related Questions