Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#10135 closed defect (bug) (fixed)

JavaScript Error In post.js When Using Internet Explorer

Reported by: brianwhite's profile brianwhite Owned by: azaozz's profile azaozz
Milestone: 2.8.1 Priority: normal
Severity: normal Version: 2.8
Component: JavaScript Keywords: has-patch reporter-feedback Internet Explorer JavaScript
Focuses: Cc:

Description

When using Internet Explorer (but not Firefox) I receive the dreaded error "Object doesn't support this property or method" I traced the error to line 217 of post.dev.js. Evidently, IE doesn't like the way the autosave function is declared inside of the if statement. The solution was to replace "autosave = function(){};" with "var autosave = function(){};" There were no problems in Firefox regardless of how autosave was declared. It was a simple change, however, I have still attached a patch with the above change.

Steps to reproduce. Access any admin page where post.js will be loaded and autosave.js is not using Internet Explorer.

Attachments (2)

post.dev.js.diff (321 bytes) - added by brianwhite 16 years ago.
Patch for post.dev.js
autosave-error.gif (45.0 KB) - added by brianwhite 16 years ago.
Screen capture of the error.

Download all attachments as: .zip

Change History (9)

@brianwhite
16 years ago

Patch for post.dev.js

#1 @Denis-de-Bernardy
16 years ago

  • Milestone changed from Unassigned to 2.8.1

#2 @Denis-de-Bernardy
16 years ago

  • Keywords has-patch commit added

#3 @Denis-de-Bernardy
16 years ago

  • Keywords reporter-feedback added; commit removed

@brianwhite - andrew is having issues reproducing, and, please try this:

document.autosave = ...

#4 @azaozz
16 years ago

Or window.autosave = ... as autosave is supposed to be in the global scope.

#5 @brianwhite
16 years ago

Using Internet Explore 8 on Windows Vista.

  • Everything worked fine when using document.autosave.
  • Everything also worked fine when using window.autosave.

I do not know why IE doesn't like autosave by itself. Neither prefix should be required.

@brianwhite
16 years ago

Screen capture of the error.

#6 @azaozz
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [11636]) Fix the test for autosave in post.js, fixes #10135 for 2.8

#7 @azaozz
16 years ago

(In [11637]) Fix the test for autosave in post.js, fixes #10135 for trunk

Note: See TracTickets for help on using tickets.