Merge pull request #1849 from zhengxiongwei520/master

Resolve the issue of other canvases being unable to interact when overlapping on mobile devices.
This commit is contained in:
Anton Lavrenov 2024-11-05 13:41:25 -05:00 committed by GitHub
commit db71b4ba28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -754,7 +754,7 @@ export class Stage extends Container<Layer> {
// TODO: are we sure we need to prevent default at all? // TODO: are we sure we need to prevent default at all?
// do not call this function on mobile because it prevent "click" event on all parent containers // do not call this function on mobile because it prevent "click" event on all parent containers
// but apps may listen to it. // but apps may listen to it.
if (evt.cancelable && eventType !== 'touch') { if (evt.cancelable && eventType !== 'touch' && eventType !== 'pointer') {
evt.preventDefault(); evt.preventDefault();
} }
} }