diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2015-07-15 16:49:34 -0400 |
---|---|---|
committer | Alexander Schmitz <arschmitz@gmail.com> | 2015-08-08 00:29:36 -0400 |
commit | 4916487440b0c087e6e5996522cf478af26df591 (patch) | |
tree | faa942968a5eea38b9aa2dc074bc399bfb5f4a9b /ui/core.js | |
parent | f0260fd91b593ae56f68e1f33ca8496c1c4b0467 (diff) | |
download | jquery-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.js | 22 |
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 ) { |