WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#27327 closed defect (bug) (invalid)

Twenty Fourteen: jquery on toggle search has alert

Reported by: blondishnet Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9
Component: Bundled Theme Keywords: close
Focuses: javascript Cc:
PR Number:

Description (last modified by SergeyBiryukov)

While inspired to use the same drop down toggle search feature as Twenty Fourteen, I was inspecting the code from between line 57 and line 69 of functions.js.

This is the alert that came up.

event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

I ended up doing my own type of work around with this -

Whether you use that or some or none... no worries. Just wanted to let you know about the alert

jQuery(document).ready(function($){
	$('#toggle-search').on('click', function(e){
		e.preventDefault();
		$('#search-container').slideToggle();
	})
});

Change History (4)

#1 @SergeyBiryukov
6 years ago

  • Component changed from Themes to Bundled Theme
  • Description modified (diff)
  • Summary changed from Twenty Fourteen - jquery on toggle search has alert to Twenty Fourteen: jquery on toggle search has alert

#2 @obenland
6 years ago

  • Keywords close added

Can reproduce it on demo site on wp.com, couldn't reproduce on latest trunk. It seems to have been fixed with r27027, updating jQuery to 1.11.
See jQuery tickets here and here.

Thanks for bringing it to our attention Nile!

#4 @lancewillett
6 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.