Opened 11 years ago
Closed 11 years ago
#27485 closed defect (bug) (fixed)
Widget Customizer: WidgetCustomizerPreview is undefined in IE8/9
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | 3.9 |
Component: | Customize | Keywords: | has-patch |
Focuses: | javascript | Cc: |
Description (last modified by )
Message: 'WidgetCustomizerPreview' is undefined Line: 310 Char: 4 Code: 0 URI: http://trunk.wp.dev/wp-admin/customize.php?theme=twentyfourteen
Attachments (3)
Change History (16)
#3
@
11 years ago
- Keywords needs-patch added
- Summary changed from Widget Customizer: WidgetCustomizerPreview is undefined in IE8 to Widget Customizer: WidgetCustomizerPreview is undefined in IE8/9
#4
@
11 years ago
- Focuses javascript added
- Keywords has-patch needs-testing added; needs-patch removed
- Moves
WidgetCustomizerPreview_exports
to export_preview_data() too and combines data to_wpWidgetCustomizerPreviewSettings
- Moves
WidgetCustomizerPreview
towp.customize.WidgetCustomizerPreview
- snake_case to CamelCase
#5
@
11 years ago
Looks good - I tested this under Windows XP/IE8 and Windows 7 IE8 & IE9 - after the patch is applied the console errors go away when initially loading the page.
Trying to add a widget however, yields a different error - i believe caused by IE8's lack of support for indexOf on arrays: http://cl.ly/image/302447300A1J. Working on a fix.
#6
@
11 years ago
27485.2.patch builds on 27485.patch and improves IE8 compatibility for the Widget Customizer by swapping JavaScript indexOf (not supported for Arrays in IE8), instead using Underscore's _.indexOf (which provides an IE8 fallback). Other than the order of passed variables, nothing else changes between indexOf and _.indexOf so I don't anticipate unexpected side effects.
After applying this patch I no longer see console errors and I amble to add and remove widgets. One remaining IE8 issue is that when I click the Save & Publish button although the settings are saved, the button does not update to the text 'Saved' as it does in other browsers. No console errors, just no change in the button. Digging more to see why that is.
#9
in reply to:
↑ 8
;
follow-up:
↓ 10
@
11 years ago
- Keywords close added; needs-testing removed
Replying to ocean90:
In 27654:
Thanks, I think we can close this ticket.
The other issue I mentioned (the button not changing to Saved) is also present in WordPress 3.8.1 and deserves a separate ticket. I think the bound change handler is failing to fire - this looks like its binding right on an object does not trigger correctly in IE8 (ref)
#10
in reply to:
↑ 9
@
11 years ago
- Keywords close removed
- Resolution set to fixed
- Status changed from new to closed
Replying to adamsilverstein:
The other issue I mentioned (the button not changing to Saved) is also present in WordPress 3.8.1 and deserves a separate ticket.
Yes please.
#11
follow-up:
↓ 12
@
11 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Some of the indexOf
instances were actually String.indexOf()
not Array.indexOf()
so they need to be reverted. Attaching patch.
@
11 years ago
Revert some of the indexOf()
replacements doing in r27654, as they were methods on Strings not Arrays.
#12
in reply to:
↑ 11
@
11 years ago
Replying to westonruter:
Some of the
indexOf
instances were actuallyString.indexOf()
notArray.indexOf()
so they need to be reverted. Attaching patch.
Ack! Good catch, these shouldn't have been changed.
#27486 was marked as a duplicate.