code: function() {
  			var selection;
  
  			if ( window.getSelection ) {
  				selection = window.getSelection();
  				if ( selection.rangeCount ) {
  					this.range = selection.getRangeAt( 0 );
  				}
  
  			// Support: IE8
  			} else {
  				this.range = document.selection.createRange();
  			}
  		}
docs: Prevent text selection from being reset when interacting with the selectmenu (#10144)