Menu and Float

4 views
Skip to first unread message

Joni_Töyrylä

unread,
Jun 8, 2006, 5:42:48 AM6/8/06
to DOM Menu Library
Dear readers,

I have a problem with DomMenu and Floating container.

Simple demonstration can be found at:
http://demo1.stonelake.fi/fi/index/.

Container, the parent of the Menu is a div that floats left. Dom menu
fails to function properly inside floating div - However, without float
the Menu works fine! Is this true that DOMMenu can not be used inside
floats or am i just making something wrong?

Thank you all for reading and Thank you Dan Allen for writing this very
good menu script!

Best wishes,
Joni Töyrylä

Dan Allen

unread,
Jun 8, 2006, 4:03:22 PM6/8/06
to dom-...@googlegroups.com
I took a look at the example and found that the source of the problem
is the domMenu_correctEdgeBleed method. The page height is being
pulled from the wrong variable, so the menu is attempting to draw
itself off the screen. You can grab a fixed version that I just
committed to SVN.

svn://www.codejanitor.com/home/cjsvn/trunk/domMenu

Unfortuantely, the improvements made to the comparable method in
dom-tooltip has not yet been ported to the dom-menu project, so it is
going through the same bugs.

Here is the diff:

Index: domMenu.js
===================================================================
--- domMenu.js (revision 2290)
+++ domMenu.js (revision 2291)
@@ -746,7 +746,7 @@

function domMenu_correctEdgeBleed(in_width, in_height, in_x, in_y,
in_padding, in_axis) {
- if (domLib_isIE && !domLib_isIE5 && !domLib_isMacIE) {
+ if (domLib_isGecko || (domLib_isIE && !domLib_isIE5 && !domLib_isMacIE)) {
var pageHeight = document.documentElement.clientHeight;
}
else if (!domLib_isKonq) {

/dan


--
Daniel Allen
Registered Linux User #231597

Mojavelinux.com: Open Source Advocacy
http://www.mojavelinux.com

While I make a strong effort to keep up with my email on a daily basis,
life and work come first and, at times, keep me away from my mail for a
while. If you contact me and then don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the filters. Please don't hesitate to resend a message if
you feel that it did not reach my attention.

Reply all
Reply to author
Forward
0 new messages