Making WordPress.org

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3119 closed defect (bug) (fixed)

Trac: Mobile menu link is not working

Reported by: mitraval192 Owned by: SergeyBiryukov
Priority: high Milestone:
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 9 years ago.
Menu Click event not working
3119.patch (2.4 KB ) - added by mitraval192 9 years ago.
Added patch for the issue #3119

Download all attachments as: .zip

Change History (6)

@mitraval192
9 years ago

Menu Click event not working

#1 @mitraval192
9 years ago

  • Priority normalhigh

#2 @SergeyBiryukov
9 years ago

  • Component GeneralTrac

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
9 years ago

Added patch for the issue #3119

#3 @SergeyBiryukov
9 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

In 5905:

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

Props mitraval192.
Fixes #3119.

#4 @SergeyBiryukov
9 years ago

  • Summary Menu link is not workingTrac: Mobile menu link is not working
Note: See TracTickets for help on using tickets.