-
Notifications
You must be signed in to change notification settings - Fork 35
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
replaced e.which, that was always 1 alteast on firefox #20
Conversation
yes it works now on firefox and chrome. but now it's broken in safari :( |
Ubuntu primarily, I do have ipad with safari. I Googled this and it seems
|
I made a small test jsbin and the result is as you said: buttons is undefined in Safari.
and when the button is not pressed (note that on firefox which is still 1):
so as you said we have to check if e.which is undefined and use e.buttons instead
|
Hi, tested with linux and all good. Used browserstack to test with ie 10 and sadly, js bin didn't work for ie 7-8. so it's still a ? I read online w3c has some different idea, on how the buttons should be sami btw browserstack.com rocks! If I only had more than 12min on my trial On 30.10.2015 11:32, Philipp Wambach wrote:
|
Hi Phillip! Do you want me to code the onmousedown/up stuff for you, or did you sami On 10/30/2015 11:32 AM, Philipp Wambach wrote:
Parhain terveisin, Sami Lehtilä sami.lehtila@w3.fi mailto:sami.lehtila@w3.fi, p. 040 595 2898 W3 Group Finland Oy - Käyttökelpoisempia ratkaisuja webiin ja ihmisten Kerava: Klondyke-talo Kumitehtaankatu 5, FI-04260 Kerava, Finland |
here it is. sorry for the indent, you seem to be using tabs.. |
hey, sorry i have been quite busy the last days. i will have a closer look at it soon. one thing we have to consider with this approach is to remove the body listener on the scope destroy event |
good catch! added the remove listeners :) |
replaced e.which, that was always 1 alteast on firefox
thx for your help! i merged your changes and also converted all tabs to spaces :) |
great! glad to be of help :) and thank you for the lib, we're using it to save signatures. the last thing for it to work straight from your repo, is the exposing the canvas object via options. I made the another pull with that change. I was not sure about the tmpcanvas, and atm not actually using it, so I think it could very well be not needed at all. Also, if you have a better idea on how to expose the canvas, by all means. Passing it to the two way config was the easiest and simplest I could think of. from there I can get the data for saving by just options.canvas.toDataURL() I might be cleaner though, to build some dedicated stuff for it to avoid confusion?! Just as long there's a way to access it, it's all good :D |
it seems e.which is depricated
https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/which