Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool enabling disables text selection on the entire document #1068

Open
ventralnet opened this issue Feb 14, 2024 · 1 comment
Open

Tool enabling disables text selection on the entire document #1068

ventralnet opened this issue Feb 14, 2024 · 1 comment

Comments

@ventralnet
Copy link

I have a certain situation in an application where we have a content editable div as a search bar. The search bar is special in that we highlight special search terms as the user types. To keep track of cursor positions as the user types we deal with text selection of the document.

When you enable a draw tool and the hooks are added there is a line that L.DomUtil.disableTextSelection. This prevents the special content editable div from receiving text select start events.

I think this is a bug. I think text selection should only be disabled on the map itself and not the entire DOM document.

This also may be a bug with L.DomUtil.disableTextSelection for leaflet

@ventralnet
Copy link
Author

I submitted a bug to leaflet as well. I think a good solution would be for L.DomUtil.disableTextSelection to accept a DOM element to operate on.

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

No branches or pull requests

1 participant