| 2161 | // Set the autocomplete attribute, turing off autocomplete 1 character before ajax search kicks in. |
| 2162 | if ( 0 === $pluginInstallSearch.val().length || $pluginInstallSearch.val().length < wp.updates.searchMinCharacters - 1 ) { |
| 2163 | $pluginInstallSearch.attr( 'autocomplete', 'on' ); |
| 2164 | } else { |
| 2165 | $pluginInstallSearch.attr( 'autocomplete', 'off' ); |
| 2166 | } |
| 2167 | |
| 2168 | // Don't search when user has typed a a minimum number of characters (default 2, 0 clears the search). |
| 2169 | if ( 0 !== $pluginInstallSearch.val().length && $pluginInstallSearch.val().length < wp.updates.searchMinCharacters ) { |
| 2170 | return; |
| 2171 | } |
| 2172 | |
| 2244 | // Set the autocomplete attribute, turing off autocomplete 1 character before ajax search kicks in. |
| 2245 | if ( 0 === $pluginSearch.val().length || $pluginSearch.val().length < wp.updates.searchMinCharacters - 1 ) { |
| 2246 | $pluginSearch.attr( 'autocomplete', 'on' ); |
| 2247 | } else { |
| 2248 | $pluginSearch.attr( 'autocomplete', 'off' ); |
| 2249 | } |
| 2250 | |
| 2251 | // Don't search when user has typed a a minimum number of characters (default 2, 0 clears the search). |
| 2252 | if ( 0 !== $pluginSearch.val().length && $pluginSearch.val().length < wp.updates.searchMinCharacters ) { |
| 2253 | return; |
| 2254 | } |
| 2255 | |