Skip to:
Content

bbPress.org

Opened 23 months ago

Closed 23 months ago

Last modified 23 months ago

#3301 closed defect (fixed)

adminbar in js function scrollToForm can be null

Reported by: Kipperlenny Owned by: johnjamesjacoby
Milestone: 2.6.3 Priority: normal
Severity: normal Version: 2.6.2
Component: Appearance - Theme Compatibility Keywords: commit
Cc:

Description

We are using the threaded reply, and it is not working since a few weeks.
If we click on "reply", it's reloading and scrolling down to normal reply form.
Console (Google Chrome), is showing:

VM8465 reply.min.js:3 Uncaught TypeError: Cannot read property 'scrollHeight' of null
at Object.scrollToForm (VM8465 reply.min.js:3)
at Object.moveForm (VM8465 reply.min.js:3)
at HTMLAnchorElement.onclick ((index):955)

I changed line 110 in templates/default/js/reply.min.js to:

		/* Offset by the adminbar */
		if ( typeof ( adminbar ) !== 'undefined' && adminbar != null ) {
			offset = adminbar.scrollHeight;
		}

because adminbar is not undefined - but NULL.

Change History (3)

#1 @johnjamesjacoby
23 months ago

  • Component changed from General to Appearance - Theme Compatibility
  • Keywords commit added
  • Milestone changed from Awaiting Review to 2.6.3
  • Owner set to johnjamesjacoby
  • Status changed from new to assigned

#2 @johnjamesjacoby
23 months ago

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

In 7010:

Replies: avoid stomping t in Reply JavaScript.

This commit fixes a bug causing the adminbar to become undefined, resulting in a JavaScript error that caused hierarchical replies not to work correctly.

Props Kipperlenny. Fixes #3301. For 2.7, trunk.

#3 @johnjamesjacoby
23 months ago

In 7011:

Replies: avoid stomping t in Reply JavaScript.

This commit fixes a bug causing the adminbar to become undefined, resulting in a JavaScript error that caused hierarchical replies not to work correctly.

Props Kipperlenny. Fixes #3301. For 2.6.3, branches/2.6.

Note: See TracTickets for help on using tickets.