[wp-trac] [WordPress Trac] #35176: Update button should be disabled if there haven't been any changes.
WordPress Trac
noreply at wordpress.org
Mon Dec 21 05:36:57 UTC 2015
#35176: Update button should be disabled if there haven't been any changes.
---------------------------+------------------------------
Reporter: EmpireOfLight | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.4
Severity: normal | Resolution:
Keywords: close | Focuses:
---------------------------+------------------------------
Comment (by khag7):
Replying to [comment:2 TimothyBlynJacobs]:
> That wouldn't really work. A post is more than the main content editor.
You have all of the custom meta boxes as well. A user might want to change
a metabox field. How would you handle that? Each metabox works
differently.
>
> Just because a user hasn't updated the main post content, does not mean
they want to save their changes made elsewhere.
Yes, a post ''is'' more than the main content editor. But all those other
fields fall inside the `form` element with id of `post`, so the jQuery
selector `form#post` should encompass all those fields.
Navigate to the edit screen for a post. Then Open your javascript console
and paste this:
`jQuery('form#post, #content').change( function(){ console.log( 'change
detected' ); });`
Then start changing stuff. Almost anything triggers a change. What doesn't
work is the post content editor. It would take some figuring out but it
should be fairly simple.
What isn't simple: figuring out if this is a good idea or not. What's the
benefit to disabling the save button?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35176#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list