Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hit area detection on Samsung Internet Browser #1075

Open
kulabros opened this issue Aug 15, 2022 · 1 comment
Open

Hit area detection on Samsung Internet Browser #1075

kulabros opened this issue Aug 15, 2022 · 1 comment

Comments

@kulabros
Copy link

Hello guys! I've found there's some problem with hitArea detection on movieclips, with shape rectangle hitArea on Samsung Internet Browser on touch devices. At all other tested browsers the functionality of my application and it's buttons works everywhere ok, but not on Samsung Internet Browser. I've found this topic - https://stackoverflow.com/questions/72203563/createjs-click-target-is-wrong-on-samsung-internet-browser - I was wondering it helps, and yes, it solves issue for some cases of the application, but for others don't - when patch is applied, some buttons work of after it wasn't before, but some others stops to work.. I've checked whats going on in _getObjectsUnderPoint method, and in default createjs code on samsung browser it really detects click anywhere to any button randomly.. I'm running 0.8.4, I've tested 1.0.0, tried to cache the shape hitarea, click or mousedown event.. When I logged, it seems the method is returning as hit on other buttons, that has mouseover/mouseout events only.. And when the patch from link was applied, there was problem with bounds, because not all assets have it defined... I tried to make condition to the touch devides with the patch from link, which has solve the isse for some of the application instances, but for some it made unable to touch on any touch device, failing at missing bounds.. So my question is, what's wrong on samsung browser, how should I define hitArea for the MovieClip and get right hitArea test, is there anyone other having same issue, or is it known issue of samsung browser, OR what I think - what can be wrong in my application regarding to movieclip's hitArea shape (or shape in container), caching it, setBounds, or maybe container.on vs. container addEventListener... I realy appreciate any help from you, best regards! :)

@danzen
Copy link
Contributor

danzen commented Sep 12, 2022

Hi @kulabros - sorry for the delay. Could you please test this file https://zimjs.com/test/samsung.html and press the buttons to see what the result is. We assume that if other devices are working properly, that your code is good and it a Samsung issue - what does it do in Chrome on Samsung? This link works for me on Samsung Galaxy Tab in both Chrome and Samsung browsers. It is using a slightly modified CreateJS that deals differently with Device Pixel Ratio than the CreateJS with Adobe.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants