Skip to:
Content

bbPress.org

Opened 2 years ago

Closed 2 years ago

#3441 closed defect (bug) (duplicate)

scrollToForm js function failing on reply with no adminbar

Reported by: createquest's profile createquest Owned by: johnjamesjacoby's profile johnjamesjacoby
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)

#1 @johnjamesjacoby
2 years ago

  • Component changed from General to Component - Replies
  • Keywords commit added
  • Milestone changed from Awaiting Review to 2.6.7
  • Owner set to johnjamesjacoby
  • Status changed from new to assigned
  • Version set to 2.6.6

Related to #3301.

#2 @johnjamesjacoby
2 years ago

  • Keywords commit removed
  • Milestone 2.6.7 deleted
  • Resolution set to duplicate
  • Status changed from assigned to closed
  • Version 2.6.6 deleted

Looks like this was fixed in #3327.

Thanks @createquest for taking the time to help make bbPress better!

Note: See TracTickets for help on using tickets.