-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EPS-575: Resolved Console error for undefined left in navigation menu #835
base: release-candidate
Are you sure you want to change the base?
Conversation
inc/js/frontend.js
Outdated
@@ -621,17 +621,16 @@ | |||
|
|||
$this.addClass( 'hfe-active-menu' ); | |||
$this.attr( 'aria-expanded', 'true' ); | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this additional space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes done.
@@ -581,8 +581,8 @@ | |||
|
|||
$( '.elementor-element-' + id + ' .hfe-nav-menu__toggle' ).next().css( 'left', '0' ); | |||
|
|||
var width = $( '.elementor-element-' + id ).closest('.elementor-section').outerWidth(); | |||
var sec_pos = $( '.elementor-element-' + id ).closest('.elementor-section').offset().left - $( '.elementor-element-' + id + ' .hfe-nav-menu__toggle' ).next().offset().left; | |||
var width = $('.elementor-element-' + id).closest('*').parent().outerWidth(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please verify these changes for container and section, and compare it with release-candidate branch.
Tested. Working fine at my end. Please pull RC and add a changelog for the fix. @earth9890 |
There are still conflicts left in there. |
Description
After clicking the navigation menu, a console error "left is undefined" was displayed. This occurred because the left value, which is returned by the offset method, was not available since the class passed in the closest method was missing. Now, if the full width option is turned on, it will use the width of its container.
Screenshots
https://drive.google.com/file/d/1f8Ps92G2_tr7QNQ2E41XeErboA68p8U2/view?usp=sharing
Types of changes
How has this been tested?
Checklist: