send android selection coordinates when touches end

This commit is contained in:
Satindar Dhillon 2022-11-30 22:25:03 -08:00
parent 59da048849
commit 708bb25470
3 changed files with 14 additions and 1 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -16,6 +16,16 @@ export function useSelection(
const handleFinishTouch = useCallback(
async (mouseEvent) => {
const tapAttributes = {
tapX: mouseEvent.clientX,
tapY: mouseEvent.clientY,
}
window?.AndroidWebKitMessenger?.handleIdentifiableMessage(
'userTap',
JSON.stringify(tapAttributes)
)
const result = await makeSelectionRange()
if (!result) {