drgullin / icheck

Highly customizable checkboxes and radio buttons (jQuery & Zepto)
http://fronteed.com/iCheck
7.39k stars 1.63k forks source link

shiftkey is not working #339

Open arenadeveloper opened 8 years ago

arenadeveloper commented 8 years ago

Hi i am trying to check if user has pressed shiftkey with click

$('input').on('ifClicked', function(event){ console.log(event.shiftKey); var box = $('.i-checks'); });

it always returns undefined. Can you help me. Another thing is the multiselect feature available with pressing shiftkey.

DixxieFlatline commented 7 years ago

Same issue here. JS console shows that the event doesn't even have the which or keyCode properties.

NoMan2000 commented 5 years ago

Here's the fix:

var shiftKey = window.event.shiftKey;

This will bring in the global window event object, which will detect if the shift key is pressed down.