fix: copy Unicode when selecting a GurbaniLipi pankti - #1884
Open
radiator13 wants to merge 3 commits into
Open
Conversation
The copy-icon path already used verse.unicode. Selecting a line and pressing Ctrl/Cmd+C copied the on-screen ASCII/GurbaniLipi glyphs. On native copy from a gurlipi line, put that pankti's unicode on the clipboard instead. Fixes KhalisFoundation#1802
Native copy only inspected the selection anchor. A reverse selection could miss the pankti. Also write through nativeEvent.clipboardData or navigator.clipboard when clipboardData is missing. Fixes KhalisFoundation#1802
- Join every selected pankti's unicode in document order instead of copying only the anchor line (KhalisFoundation#1802) - Leave collapsed/empty selections to the native copy - Fall back to native copy unless the selection touches GurbaniLipi - Extend unit tests for all three cases
Author
|
Follow-up commit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1802
Problem
The copy-icon copied Unicode. Selecting a pankti and pressing Ctrl/Cmd+C copied ASCII/GurbaniLipi.
Cause
With Unicode display off, the DOM text is GurbaniLipi. Native copy uses that text.
Change
data-unicode-verse.gurlipi/.gurlipi-reading-modeline, write that unicode to the clipboardTest