Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#42984 closed defect (bug) (invalid)

Widget Save button problem

Reported by: alexvorn2's profile alexvorn2 Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9
Component: Widgets Keywords:
Focuses: Cc:


Why on earth did you disabled Save button for widgets in widget.php page?
My problem is that I have a color picker input and after I select the color, the Save button is disabled and I can't save the widget! Please let's revert how it was before.

Yes it works after I change other inputs but for my choose color input it does not enable itself...

I uploaded a video on youtube so It will be clear for you -

Change History (6)

#1 @alexvorn2
6 years ago

  • Keywords needs-patch added

This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.

6 years ago

#3 @westonruter
6 years ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • Version changed from trunk to 4.9

It's saved until the widget becomes dirty, until an input has a change event happen on it. All you need to do is trigger('change') on the hidden input. Coincidentally this is also required for the widget to work in the Customizer.

This is documented in under §Widget Saved State on Admin Screen.

#4 @alexvorn2
6 years ago

I don't like this approach... I will try to add this action to color picker but what if I can't add?
Does color picked has an end action where I can attach this trigger function? I don't think so...

Should I make a new ticket about Color Picker or what should I do If your solution does not work?

#5 @alexvorn2
6 years ago

I took a look and It does not work as you say, If I change the color then this trigger change action will be called 100 + times - take a look in the video I uploaded to youtube if you don't believe me -

We need to make the button clickable or to add a new callback action/function to Color Picker that will get executed/called at the end of selecting color.

I created a new ticket - You can take a look.

#6 @alexvorn2
6 years ago

Ok, I made this widget save after some testings... Thanks for your reply.

Note: See TracTickets for help on using tickets.