Skip to content

Commit

Permalink
Fix #1079: ColumnSet: Update feature detection for wheel events
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth G. Franqueiro committed Jan 22, 2015
1 parent 6d946bd commit 798768e
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions ColumnSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,10 @@ define([
'xstyle/css!./css/columnset.css'
], function (declare, lang, on, aspect, query, has, miscUtil, put) {
has.add('event-mousewheel', function (global, document, element) {
return typeof element.onmousewheel !== 'undefined';
return 'onmousewheel' in element;
});
has.add('event-wheel', function (global) {
var supported = false;
// From https://developer.mozilla.org/en-US/docs/Mozilla_event_reference/wheel
try {
global.WheelEvent('wheel');
supported = true;
} catch (e) {
// empty catch block; prevent debuggers from snagging
}
return supported;
has.add('event-wheel', function (global, document, element) {
return 'onwheel' in element;
});

var colsetidAttr = 'data-dgrid-column-set-id';
Expand Down

0 comments on commit 798768e

Please sign in to comment.