Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

mouseup outside of input #7

Open
six60 opened this issue Nov 23, 2015 · 1 comment
Open

mouseup outside of input #7

six60 opened this issue Nov 23, 2015 · 1 comment

Comments

@six60
Copy link

six60 commented Nov 23, 2015

Hi,

I noticed when you mousedown on the input then mouseup outside of the input it doesn't select the text. I don't know if you want this behaviour but I added it for myself so I thought I'd share. This is onmousedown for the input (in Typescript).

$(window).on("mouseup.select-text", function (e)
{
var input$: JQuery = $("#inputID");
if (e.target != input$[0])
{
input$.focus().select();
}
$(window).off("mouseup.select-text");
});

@AndersDJohnson
Copy link
Owner

@six60 Thanks for the suggestion. I might consider supporting this, but would make it optional. Any interest in forking, implementing, and submitting a pull request?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants