Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

fix(timepicker): added wheel event to enable mousewheel on Firefox #684

Closed
wants to merge 2 commits into from
Closed

Conversation

lazychino
Copy link
Contributor

Fix for this issue669
I added some tests to timepicker.spec.js, and tested on Firefox 22 and Chrome 28

This is my first ever pull request, hope is ok :)

var inputs = element.find('input');
var hoursEl = inputs.eq(0), minutesEl = inputs.eq(1);
var upMouseWheelEvent = wheelThatOtherMouse(-1);
var downMouseWheelEvent = wheelThatOtherMouse(1);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added separate test for the wheel event

the logic of deltaY is opposite of wheelDelta that why the values on up and down are inverted

@bekos
Copy link
Contributor

bekos commented Jul 19, 2013

Good job & nice PR @lazychino :-)

Just 2 comments/questions on the code.

@lazychino
Copy link
Contributor Author

After check on Chrome 28, Firefox 22, Opera 15, Internet Explorer 9 and Safari(not sure which version is pretty new but forgot to check), the 'wheel' event is only working with Firefox and Internet Explorer. So, my guess is that for the meantime is better to bind both 'mousewheel' and 'wheel' events.

@lazychino lazychino closed this Jul 23, 2013
@lazychino lazychino reopened this Jul 23, 2013
@bekos
Copy link
Contributor

bekos commented Jul 23, 2013

OK @lazychino, that's fine. I think it's good to merge :-) Can you squash the commits to one?

@pkozlowski-opensource
Copy link
Member

Landed as 8dc92af. Thank you!

codedogfish pushed a commit to codedogfish/angular-ui-bootstrap that referenced this pull request Sep 15, 2015
chore(refactor): split code into multiple files
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants