Skip to content
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

Open
wants to merge 32 commits into
base: release-candidate
Choose a base branch
from

Conversation

earth9890
Copy link
Member

@earth9890 earth9890 commented Jun 6, 2024

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:

  • My code is tested
  • My code passes the PHPCS tests
  • My code follows accessibility standards
  • My code has proper inline documentation
  • I've included any necessary tests
  • I've included developer documentation
  • I've added proper labels to this pull request

@@ -621,17 +621,16 @@

$this.addClass( 'hfe-active-menu' );
$this.attr( 'aria-expanded', 'true' );

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this additional space.

Copy link
Member Author

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();
Copy link
Contributor

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.

@earth9890 earth9890 requested a review from vijetaR June 13, 2024 13:47
@earth9890 earth9890 changed the title ESP-410: Resolved Console error for undefined left in navigation menu ESP-575: Resolved Console error for undefined left in navigation menu Jun 14, 2024
@earth9890 earth9890 changed the title ESP-575: Resolved Console error for undefined left in navigation menu EPS-575: Resolved Console error for undefined left in navigation menu Jun 14, 2024
@vijetaR
Copy link
Contributor

vijetaR commented Jun 16, 2024

Tested. Working fine at my end. Please pull RC and add a changelog for the fix. @earth9890

@vijetaR
Copy link
Contributor

vijetaR commented Jun 17, 2024

There are still conflicts left in there.
Once you add the changelog in readme.txt file > Do grunt readme

README.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants