Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#12829 closed defect (bug) (fixed)

JS for page/post submit meta-box doesn't update page dynamically

Reported by: duck_ Owned by: azaozz
Priority: normal Milestone: 3.0
Component: JavaScript Version: 3.0
Severity: normal Keywords: has-patch needs-testing
Cc: Focuses:

Description

Go to edit the page/post status or visibility in the submit meta box, then click the cancel button. The page then jumps to element with id="post_status" or id="visibility" (jumping doesn't occur for published on because no id="edit_timestamp").

I believe this occurs because there is a javascript error in post.js where the variable "page" is not defined. Introduced in r13551 when "page" declaration was removed when another occurrence of its use was removed.

Attachments (2)

post.dev.js.diff​ (439 bytes ) - added by duck_ 17 years ago.
post.dev.js.2.diff​ (788 bytes ) - added by duck_ 17 years ago.
var post only used in updateText(), declaring it there probably makes more sense

Download all attachments as: .zip

Change History (6)

#1 @duck_
17 years ago

  • Keywords has-patch needs-testing added

#2 @duck_
17 years ago

  • Summary Page/post misc publishing actions cancel buttons cause page to jump to id tag → JS for page/post submit meta-box doesn't update page dynamically

Actually worse than just the jumping to the element with matching id. The entire post submit meta box doesn't update on the page dynamically when new options from status, visibility or published on.

E.g. try changing published page to draft (edit, select draft, click ok). Status text stays as "Published" and submit button doesn't change to "Update Page".

@duck_
17 years ago

var post only used in updateText(), declaring it there probably makes more sense

#3 @ocean90
17 years ago

See also #12834.

#4 @dd32
17 years ago

  • Resolution → fixed
  • Status new → closed

See wordpress: dd32 * r14125 /trunk/ (3 files in 2 dirs): Fix undefined page var in Post Javascript; Fixes inactive cancel button in Publish time selection. Props duck_. Fixes #12829

Note: See TracTickets for help on using tickets.