aboutsummaryrefslogtreecommitdiffstats
path: root/ui/core.js
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2015-07-15 16:49:34 -0400
committerAlexander Schmitz <arschmitz@gmail.com>2015-08-08 00:29:36 -0400
commit4916487440b0c087e6e5996522cf478af26df591 (patch)
treefaa942968a5eea38b9aa2dc074bc399bfb5f4a9b /ui/core.js
parentf0260fd91b593ae56f68e1f33ca8496c1c4b0467 (diff)
downloadjquery-ui-4916487440b0c087e6e5996522cf478af26df591.tar.gz
jquery-ui-4916487440b0c087e6e5996522cf478af26df591.zip
Core: Move disable-selection into its own module
Ref #9647
Diffstat (limited to 'ui/core.js')
-rw-r--r--ui/core.js22
1 files changed, 3 insertions, 19 deletions
diff --git a/ui/core.js b/ui/core.js
index 6cf599964..1072e89f1 100644
--- a/ui/core.js
+++ b/ui/core.js
@@ -21,7 +21,9 @@
define( [
"jquery",
"./data",
- "./version" ], factory );
+ "./disable-selection",
+ "./version"
+ ], factory );
} else {
// Browser globals
@@ -284,24 +286,6 @@ if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) {
// deprecated
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
-$.fn.extend( {
- disableSelection: ( function() {
- var eventType = "onselectstart" in document.createElement( "div" ) ?
- "selectstart" :
- "mousedown";
-
- return function() {
- return this.on( eventType + ".ui-disableSelection", function( event ) {
- event.preventDefault();
- } );
- };
- } )(),
-
- enableSelection: function() {
- return this.off( ".ui-disableSelection" );
- }
-} );
-
// $.ui.plugin is deprecated. Use $.widget() extensions instead.
$.ui.plugin = {
add: function( module, option, set ) {