[wp-trac] [WordPress Trac] #43331: Color picker breaks admin panel in many templates
WordPress Trac
noreply at wordpress.org
Thu Feb 15 13:05:06 UTC 2018
#43331: Color picker breaks admin panel in many templates
----------------------------+-----------------------------
Reporter: grzecho | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version:
Severity: normal | Keywords:
Focuses: |
----------------------------+-----------------------------
The error prevents the document from beign saved.
'''Console error:'''
color-picker.min.js?ver=4.9.4:1 Uncaught TypeError: Cannot read property
'addClass' of undefined at a.(anonymous function).(anonymous
function).close (https://www.szybkiangielski.pl/wp-admin/js/color-
picker.min.js?ver=4.9.4:1:3088)....
'''Error is caused by line 316 in color-picker.js'''
this.inputWrapper.addClass( 'hidden' );
'''I corrected the code by replacing the code with:'''
if(typeof this.inputWrapper !== "undefined") {
this.inputWrapper.addClass( 'hidden' );
}
'''This stops the error, page can now be saved and color picker works
fine'''
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43331>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list