mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-31 21:48:36 +01:00
Widgets: Prevent checkValidity
from running on a form when widget is first adding to sidebar.
Amends [41352]. See #23120. Fixes #43003 for 4.9 branch. Built from https://develop.svn.wordpress.org/branches/4.9@42522 git-svn-id: http://core.svn.wordpress.org/branches/4.9@42351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
be9734cbee
commit
4c4d1ecbe5
@ -513,9 +513,10 @@ wpWidgets = {
|
|||||||
save : function( widget, del, animate, order ) {
|
save : function( widget, del, animate, order ) {
|
||||||
var self = this, data, a,
|
var self = this, data, a,
|
||||||
sidebarId = widget.closest( 'div.widgets-sortables' ).attr( 'id' ),
|
sidebarId = widget.closest( 'div.widgets-sortables' ).attr( 'id' ),
|
||||||
form = widget.find( 'form' );
|
form = widget.find( 'form' ),
|
||||||
|
isAdd = widget.find( 'input.add_new' ).val();
|
||||||
|
|
||||||
if ( ! del && form.prop( 'checkValidity' ) && ! form[0].checkValidity() ) {
|
if ( ! del && ! isAdd && form.prop( 'checkValidity' ) && ! form[0].checkValidity() ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
wp-admin/js/widgets.min.js
vendored
2
wp-admin/js/widgets.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.9.3-alpha-42520';
|
$wp_version = '4.9.3-alpha-42522';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user