ajlkn / jquery.dropotron

Adds multilevel dropdown menus to jQuery.
132 stars 61 forks source link

Calculation of menu spilling over window boundary incorrect #1

Closed daverooneyca closed 9 years ago

daverooneyca commented 10 years ago

The calculation of the right boundary isn't including the opener's width, so it's allowing the menu to spill over the window boundary when the dropdown is located close to the right margin.

Specifically on lines 162 and 175, this code:

left + mw > _window.width()

needs to be:

oo.left + left + mw > _window.width()

I'd create a pull request, but I don't have the access rights to create a new branch.

Thanks!

ajlkn commented 10 years ago

Hey. Sorry, just now getting around to this. I assume this is still a problem in the latest version?

ajlkn commented 9 years ago

Should be fixed in 1.4.3.