- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Mouse event not being triggered on HTML5 canvas? How to solve it?
To trigger mouse event we can add −
-webkit-transform: translate3d(0, 0, 0)
In addition to this canvas can also be styled.
Another way is to add a listener in the event mousemove,
canvas.addEventListener("mousemove", this.checkMouseLocation.bind(this, this.inputs), false);
By adding this listener, we can easily trigger a mouse move event in HTML5.
Advertisements