We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b10fc81 commit 0784d51Copy full SHA for 0784d51
live-view/live-view.js
@@ -441,10 +441,30 @@ function addBottomSwipeListener() {
441
442
} else { // if clicked and bottom float not expanded
443
444
+ // if clicked the bottom float's swipe hitbox
445
+ // but not the bottom float itself
446
if (e.target === bottomWrapper) {
447
448
console.log('click', e);
449
450
+ // get caret range from point
451
+
452
+ const pointX = e.touches[0].clientX,
453
+ pointY = e.touches[0].clientY;
454
455
+ const range = document.caretRangeFromPoint(pointX, pointY);
456
457
+ // if range exists
458
+ if (range) {
459
460
+ // select range
461
462
+ const sel = window.getSelection();
463
464
+ sel.addRange(range);
465
466
+ }
467
468
}
469
470
0 commit comments