src/core/util/util.js
function disableElementScroll(element) {
        element = angular.element(element || body);

        var scrollMask;

        if (options.disableScrollMask) {
          scrollMask = element;
        } else {
          scrollMask = angular.element(
            '<div class="md-scroll-mask">' +
            '  <div class="md-scroll-mask-bar"></div>' +
            '</div>');
          element.append(scrollMask);
        }

        scrollMask.on('wheel', preventDefault);
        scrollMask.on('touchmove', preventDefault);

        return function restoreElementScroll() {
          scrollMask.off('wheel');
          scrollMask.off('touchmove');

          if (!options.disableScrollMask && scrollMask[0].parentNode) {
            scrollMask[0].parentNode.removeChild(scrollMask[0]);
          }
        };

        function preventDefault(e) {
          e.preventDefault();
        }
      }
function disableElementScroll(element) {
        element = angular.element(element || body);

        var scrollMask;

        if (options.disableScrollMask) {
          scrollMask = element;
        } else {
          scrollMask = angular.element(
            '<div class="md-scroll-mask">' +
            '  <div class="md-scroll-mask-bar"></div>' +
            '</div>');
          element.append(scrollMask);
        }

        scrollMask.on('wheel', preventDefault);
        scrollMask.on('touchmove', preventDefault);

        return function restoreElementScroll() {
          scrollMask.off('wheel');
          scrollMask.off('touchmove');

          if (!options.disableScrollMask && scrollMask[0].parentNode) {
            scrollMask[0].parentNode.removeChild(scrollMask[0]);
          }
        };

        function preventDefault(e) {
          e.preventDefault();
        }
      }
function disableElementScroll ( element ) { element = angular . element ( element || body ) ; var scrollMask ; if ( options . disableScrollMask ) { scrollMask = element ; } else { scrollMask = angular . element ( '<div class="md-scroll-mask">' + '  <div class="md-scroll-mask-bar"></div>' + '</div>' ) ; element . append ( scrollMask ) ; } scrollMask . on ( 'wheel' , preventDefault ) ; scrollMask . on ( 'touchmove' , preventDefault ) ; return function restoreElementScroll ( ) { scrollMask . off ( 'wheel' ) ; scrollMask . off ( 'touchmove' ) ; if ( ! options . disableScrollMask && scrollMask [ 0 ] . parentNode ) { scrollMask [ 0 ] . parentNode . removeChild ( scrollMask [ 0 ] ) ; } } ; function preventDefault ( e ) { e . preventDefault ( ) ; } }
Creates a virtual scrolling mask to prevent touchmove, keyboard, scrollbar clicking,
and wheel events
Creates a virtual scrolling mask to prevent touchmove keyboard scrollbar clicking and wheel events