WordPress.org

Making WordPress.org

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#3119 closed defect (fixed)

Trac: Mobile menu link is not working

Reported by: mitraval192 Owned by: SergeyBiryukov
Milestone: Priority: high
Component: Trac Keywords:
Cc:

Description

In the mobile device, the menu click event is not working, I investigate this issue and found below error.

Error is

Uncaught ReferenceError: toggleMenu is not defined at HTMLAnchorElement.onclick

Attachments (2)

Menu_click_event.png (670.7 KB) - added by mitraval192 4 years ago.
Menu Click event not working
3119.patch (2.4 KB) - added by mitraval192 4 years ago.
Added patch for the issue #3119

Download all attachments as: .zip

Change History (6)

@mitraval192
4 years ago

Menu Click event not working

#1 @mitraval192
4 years ago

  • Priority changed from normal to high

#2 @SergeyBiryukov
4 years ago

  • Component changed from General to Trac

Confirmed. The mobile menu works on wordpress.org and make.wordpress.org, but not on Trac instances, because the toggleMenu() function is missing there.

Adding it to trac.wordpress.org/templates/wporg-head.html should resolve the issue:

<script type="text/javascript">
var toggleMenu = function(){
    var m = document.getElementById('wporg-header-menu'),
        c = m.className;
	    m.className = c.match( ' active' ) ? c.replace( ' active', '' ) : c + ' active';
}
</script>

@mitraval192
4 years ago

Added patch for the issue #3119

#3 @SergeyBiryukov
4 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 5905:

Trac: Add missing toggleMenu() function for mobile menu.

Props mitraval192.
Fixes #3119.

#4 @SergeyBiryukov
4 years ago

  • Summary changed from Menu link is not working to Trac: Mobile menu link is not working
Note: See TracTickets for help on using tickets.