remove stopEvent from util -> event
This commit is contained in:
parent
74408f30ac
commit
5b02b658fe
3 changed files with 5 additions and 9 deletions
|
|
@ -61,6 +61,9 @@ exports.removeListener = function(elem, type, callback) {
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Prevents propagation and clobbers the default action of the passed event
|
||||
*/
|
||||
exports.stopEvent = function(e) {
|
||||
exports.stopPropagation(e);
|
||||
exports.preventDefault(e);
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ For more information about SproutCore, visit http://www.sproutcore.com
|
|||
|
||||
define(function(require, exports, module) {
|
||||
|
||||
var dom = require('pilot/dom');
|
||||
var util = require('pilot/util');
|
||||
|
||||
|
||||
|
|
@ -215,7 +216,7 @@ exports.addKeyDownListener = function(element, boundFunction) {
|
|||
var handled = boundFunction(ev);
|
||||
// If the boundFunction returned true, then stop the event.
|
||||
if (handled) {
|
||||
util.stopEvent(ev);
|
||||
dom.stopEvent(ev);
|
||||
}
|
||||
return handled;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -419,14 +419,6 @@ if (typeof(document) !== 'undefined' && document.compareDocumentPosition) {
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevents propagation and clobbers the default action of the passed event
|
||||
*/
|
||||
exports.stopEvent = function(ev) {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a random password of the given length (default 16 chars)
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue