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

Corywritescode/issue19/toggle not working on mobile #22

Conversation

CoryWritesCode
Copy link
Contributor

Styling updates:

Before:
Screen Shot 2019-10-28 at 10 25 33 AM
After:
Screen Shot 2019-10-28 at 10 25 50 AM


JS updates

The .click() jquery method is great for desktop applications. Since it's listening for a mouse event it's not going to pick up on a touch event.
Per reading this article I swapped the .click() events to .on("click touchstart", ...) which should capture both click and touch events.

@LabinatorSolutions LabinatorSolutions merged commit 05ebbc2 into LabinatorSolutions:master Oct 28, 2019
@CoryWritesCode CoryWritesCode deleted the corywritescode/issue19/toggle-not-working-on-mobile branch October 28, 2019 16:08
@CoryWritesCode
Copy link
Contributor Author

this satisfies #19

@LabinatorSolutions
Copy link
Owner

After testing the commit, I couldn't manage to make it work. The button are flashing on and off then returning back to their original state. The AI button is still not working. Is it working on your mobile device? (or you can even test it using your browser without a mobile device by enabling the touch-based support from your dev console).

@CoryWritesCode
Copy link
Contributor Author

@LabinatorSolutions I think I see the issue. Should have used tap not touchstart. My bad. I didn't find a way to serve the JS up to the browser. I could load the page but the JS wasn't working. Is there a way to do that so I can check my fix?

@LabinatorSolutions
Copy link
Owner

@CoryWritesCode : Thank you for your message.

The best way to check your fix is to launch the app locally using a localhost stack. XAMPP works well but there are many other ways as well. Bitnami also offers ready-made stacks and modules that you can deploy instantly and locally for testing. You basically need a web server to test it up. An Apache webserver should be sufficient since we don't even have a database for this app.

Please note that your browser by itself will not load JS or the engine. You can also visit the live URL of this repository without installing anything if you need to check the bug right away.

@LabinatorSolutions
Copy link
Owner

@CoryWritesCode : Replacing touchstart with tap helps in solving the bug that got emerged after the last commit but it does not make the "AI" button work. It is still doing nothing. Most probably, the board actions are not assigned to the board that is used in the touch-based devices.

@CoryWritesCode
Copy link
Contributor Author

I can take a look at that too. Now that I'm able to serve it up locally it should be easier to debug.

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

Successfully merging this pull request may close these issues.

2 participants