Skip to content

Instantly share code, notes, and snippets.

@xenophy
Created January 25, 2015 14:17
Show Gist options
  • Save xenophy/63a4cec3720d319e47b1 to your computer and use it in GitHub Desktop.
Save xenophy/63a4cec3720d319e47b1 to your computer and use it in GitHub Desktop.
EXTJS-16164 Patch in Ext JS 5.1.0
// http://www.sencha.com/forum/showthread.php?296296
Ext.define('Ext.patch.EXTJS16164', {
// {{{ override
override: 'Ext.selection.CheckboxModel',
// }}}
// {{{ compatibility
compatibility: '5.1.0.107',
// }}}
// {{{ privates
privates: {
selectWithEventMulti: function(record, e, isSelected) {
var me = this;
if (!e.shiftKey && !e.ctrlKey && e.getTarget(me.checkSelector)) {
if (isSelected) {
me.doDeselect(record); // Second param here is suppress event, not "keep selection"
} else {
me.doSelect(record, true);
}
} else {
me.callParent([record, e, isSelected]);
}
}
}
// }}}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment