mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-30 13:28:48 +01:00
🎨 The toolbar content cannot be slid on Android https://github.com/siyuan-note/siyuan/issues/14979
This commit is contained in:
parent
084ddfd389
commit
a37e23bf5f
1 changed files with 3 additions and 1 deletions
|
|
@ -521,13 +521,15 @@ export const initKeyboardToolbar = () => {
|
|||
</div>
|
||||
<div class="keyboard__util"></div>`;
|
||||
let startY = 0;
|
||||
let startX = 0;
|
||||
let moved = false;
|
||||
toolbarElement.addEventListener("touchstart", e => {
|
||||
startY = e.touches[0].clientY;
|
||||
startX = e.touches[0].clientX;
|
||||
moved = false;
|
||||
});
|
||||
toolbarElement.addEventListener("touchmove", e => {
|
||||
if (Math.abs(e.touches[0].clientY - startY) > 10) {
|
||||
if (Math.abs(e.touches[0].clientY - startY) > 10 || Math.abs(e.touches[0].clientX - startX) > 10) {
|
||||
moved = true;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue