-
Notifications
You must be signed in to change notification settings - Fork 200
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
Ctrl + c copies text with correct formatting #2708
Conversation
Are you planning to work on the remaining issue or waiting for help? |
I'm waiting for a response to this then I want to finish it |
In which context is CTRL+C supposed to work exactly? I though it is only when AmbiguousSelection component is visible. |
I would like for it to also work when selecting text with mouse. In this case AmbigiousSelection component does not show. |
It needs separate implementation I think. It's different to work with AmbiguousSelection than general selection. |
Ok, I know how I could do that, but I was a bit confused why the listener in AmbiguousSelection does not get unregistered when AmbigiousSelection is unloaded. Do you know why? |
AmbiguousSelection is loaded all the time, just UI part hidden most of the time (see BibleView.vue where it is loaded). |
I think this is done now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
Related #2622
One issue still needs to be solved.
If I select text manually on AB startup (before verse has been clicked), and then press Ctrl + c, it uses system copy instead of my implemented "share copy". This is because
AmbiguousSelection
has not yet been loaded (which listens to Ctrl + c press).However, once I click a verse and
AmbiguousSelection
loads, I can close the modal, select text manually and press Ctrl + c and the text is copied using my "share copy". I am not sure why, because it looks likesetupDocumentEventListener
in utils does (or should) removeEventListener ononUnmounted
.I would like for ctrl + c to always use my "share copy", is that correct thinking for user UX? Commentaries and genbooks etc will still just have regular system copy.
If ctrl + c should always use "share copy" even for manually selected Bible text, should the Ctrl + c listener be somewhere else than in
AmbiguousSelection
component?