HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: /home/mmickelson/martyknows.com/wp-content/themes/p2/js/jquery.ui.autocomplete.multiValue.js
/*
 * jQuery UI Autocomplete Multi Value Extension
 *
 * Author: Daryl Koopersmith
 *
 * Based on jQuery UI Autocomplete 1.8.11
 */
(function( $ ) {

var create = $.ui.autocomplete.prototype._create;

// Prevent TAB from changing the text field when the menu is open.
$.ui.autocomplete.prototype._create = function() {
	var self = this;
	// Must be bound before _create is called, otherwise the default keydown
	// function will close the menu before we can check menu.active
	this.element.bind('keydown.autocomplete.multiValue', function( event ) {
		if ( self.menu.active && event.keyCode === $.ui.keyCode.TAB )
			event.preventDefault();
	});
	create.apply( this, arguments );
};

// When an item is focused, prevent the contents of the field from being replaced.
$( document ).on( 'autocompletefocus.multiValue', '.ui-autocomplete-input', function( event ) {
	if ( $( this ).autocomplete( 'option', 'multiValue' ) )
		event.preventDefault();
});

}( jQuery ));