Skip to content

Allow selection without focusing for input? #5227

Closed Answered by RahjIII
RahjIII asked this question in Q&A
Discussion options

You must be logged in to vote

Adding the "disabled" attribute to the items with the classname "xterm-helper-textarea" had the effect that I was looking for. Something like this worked for me for preventing a focus grab and having the soft keyboard from opening up.

    keyboardEnable(enabled=true) {
        let helpers = document.getElementsByClassName("xterm-helper-textarea");
        if(enabled === false) {
            for(let i=0;i<helpers.length;i++) {
                helpers[i].setAttribute("disabled","true");
            }
        } else {
            for(let i=0;i<helpers.length;i++) {
                helpers[i].removeAttribute("disabled");
            }
        }
    }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RahjIII
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant