mirror of
https://github.com/danog/telegram-tt.git
synced 2025-01-22 05:11:55 +01:00
Message: Fix links system menu on Android
This commit is contained in:
parent
64bdaae142
commit
57d7ec1e21
@ -54,6 +54,11 @@ export default function useOuterHandlers(
|
||||
|
||||
function handleContextMenu(e: React.MouseEvent<HTMLDivElement, MouseEvent>) {
|
||||
if (IS_ANDROID) {
|
||||
if (!(e.target as HTMLElement).matches('a[href]')) {
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
selectMessage();
|
||||
} else {
|
||||
onContextMenu(e);
|
||||
|
@ -32,7 +32,7 @@ export default (
|
||||
const handleContextMenu = useCallback((e: React.MouseEvent) => {
|
||||
document.body.classList.remove('no-selection');
|
||||
|
||||
if (isMenuDisabled || (shouldDisableOnLink && (e.target as HTMLElement).matches('a.text-entity-link[href]'))) {
|
||||
if (isMenuDisabled || (shouldDisableOnLink && (e.target as HTMLElement).matches('a[href]'))) {
|
||||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
@ -91,7 +91,7 @@ export default (
|
||||
|
||||
const { clientX, clientY, target } = originalEvent.touches[0];
|
||||
|
||||
if (contextMenuPosition || (shouldDisableOnLink && (target as HTMLElement).matches('a.text-entity-link[href]'))) {
|
||||
if (contextMenuPosition || (shouldDisableOnLink && (target as HTMLElement).matches('a[href]'))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user