Opened 5 years ago
Closed 4 years ago
#3441 closed defect (bug) (duplicate)
scrollToForm js function failing on reply with no adminbar
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | Component - Replies | Keywords: | |
| Cc: |
Description
With latest install 2.6.6 I noticed that when clicking the reply link the page refreshes after. when before the form would show in the reply and then scroll down. I fixed it on my local by adding an extra conditional for checking if adminbar is null.
Previous code
/* Offset by the adminbar */
if ( typeof ( adminbar ) !== 'undefined' ) {
offset = adminbar.scrollHeight;
}
Updated code
/* Offset by the adminbar */
if ( typeof adminbar !== 'undefined' ) {
if(adminbar !== null) {
offset = adminbar.scrollHeight;
}
}
Hope this helps!
Change History (2)
Note: See
TracTickets for help on using
tickets.
Related to #3301.