3 Fixed the following bugs:
4 -------------------------
6 + Pressing the Esc key when an item in a MenuBar has focus will now result
7 in the item blurring in IE.
9 + Clicking a YAHOO.widget.MenuItem instance with a "url" configuration property
10 set will now result in the hiding of its parent YAHOO.widget.Menu instance.
12 + Creating an empty YAHOO.widget.Menu instance from existing markup will no
13 longer result in a JavaScript error.
15 + The "constraintoviewport" configuration property now correctly keeps a
16 YAHOO.widget.Menu instance inside the boundaries of the browser viewport.
18 + Tuned scrolling behavior so that when the user has scrolled to the bottom of
19 a YAHOO.widget.Menu instance and starts pressing the up arrow key, the
20 contents begin scrolling only when the next item to be selected is out of
21 view of the scrollable area.
23 + Modified "removeMenu" method of YAHOO.widget.MenuManager so that it removes
24 the specified YAHOO.widget.Menu instance from the collection of visible menus.
26 + Calling the "destroy" method of a visible YAHOO.widget.Menu instance now
27 purges it from the YAHOO.widget.Manager's collection of visible Menus.
29 + YAHOO.widget.Menu instances now blur before hiding.
31 + The debug version of YAHOO.widget.Menu now correctly logs as "Menu" rather
34 + Setting a YAHOO.widget.MenuItem instance's "checked" configuration property
35 to "true" two or more times followed by "false" will no longer result in some
36 of the DOM elements used to render the checkmark icon will no longer remain
39 + It is now possible to click anywhere on a YAHOO.widget.MenuItem instance
40 and have it navigate to the URL specified by its "url" configuration property
41 - even if the MenuItem has a value specified for its "target"
42 configuation property.
44 + The "toString" method of YAHOO.widget.MenuItem now returns the instance's id.
46 + Setting the YAHOO.widget.MenuItem.prototype.COLLAPSED_SUBMENU_INDICATOR_TEXT
47 constant to empty string no longer results in JavaScript error.
49 + YAHOO.widget.MenuBar instances behave the same regardless of the value
50 of their "position" configuration property.
52 + It is now possible to ctr or shift-click on YAHOO.widget.MenuItem instances
53 without the browser automatically redirecting to the URL specified by the
54 MenuItem's "url" configuration property.
57 Added the following features:
58 -----------------------------
60 + Prototype of all classes (Menu, ContextMenu, MenuBar, MenuItem,
61 ContextMenuItem, MenuBarItem) are augmented with YAHOO.util.EventProvider.
63 + Added the following methods to YAHOO.widget.MenuManager:
68 + Added the following methods to YAHOO.widget.Menu:
74 + Added a "disabled" configuration property to YAHOO.widget.Menu.
76 + Added the constant "CSS_LABEL_CLASS_NAME" to YAHOO.widget.MenuItem that
77 represents the name of the CSS class applied to the <A/> node that is the
78 first child of its root <LI/> node.
80 + Added the constant "CSS_LABEL_CLASS_NAME" to YAHOO.widget.MenuBarItem that
81 represents the name of the CSS class applied to the <A/> node that is the
82 first child of its root <LI/> node.
84 + Added ability for YAHOO.widget.Menu instances to have shadow:
86 - The shadow for a Menu is implemented by appending a new element as the
87 last child of its root <DIV/> element:
92 <LI class="yuimenuitem"/>
93 <LI class="yuimenuitem"/>
94 <LI class="yuimenuitem"/>
97 <DIV class="yui-menu-shadow"/>
100 - The code that creates the shadow element resides inside the Menu's
101 public "onRender" prototype method. To disable the creation of a Menu's
102 shadow override the prototype of the "onRender" method:
104 YAHOO.widget.Menu.prototype.onRender = function () { };
106 - The actual creation of the shadow element is deferred until the Menu is
107 made visible for the first time.
109 - The shadow element is only created for Menu instances whose
110 "position" configuration property is set to "dynamic."
112 - A Menu's shadow element can be styled via two CSS classes:
114 + "yui-menu-shadow" - Applied to the shadow element when it is created.
115 + "yui-menu-shadow-visible" - Applied to the shadow element when the
116 Menu is visible; it is removed when hidden.
118 - The shadow element is only styled when using the new "Sam" skin, for
119 the previous default skin its "display" property is set to "none."
125 + Deprecated "browser" property of YAHOO.widget.MenuItem in favor
128 + Modified the DOM structure for a YAHOO.widget.MenuItem instance so that its
129 root <LI/> node only has only two direct descendants:
131 - The <A/> node for its text label
132 - The <DIV/> node for its submenu
134 The submenu indicator node (<EM class="submenuindicator" />), checked
135 indicator node (<EM class="checkedindicator" />), and help text node
136 (<EM class="helptext" />) that were previously direct descendants of a
137 YAHOO.widget.MenuItem instance's root <LI/> are now direct descendants of
140 <LI class="yuimenuitem || yuimenubaritem">
142 <A class="yuimenuitemlabel || yuimenubaritemlabel">
146 <EM class="helptext"> Help Text </EM> (Optional)
147 <EM class="checkedindicator"> ... </EM> (Optional)
148 <EM class="submenuindicator"> ... </EM> (Optional)
152 <DIV class="yuimenu"> ... </DIV> (Optional submenu node)
156 + As a result of the DOM structure changes for YAHOO.widget.MenuItem, the
157 following CSS class are now only applied to a YAHOO.widget.MenuItem
158 instance's <A/> node:
166 + The "text" configuration property of YAHOO.widget.MenuItem now accepts a
167 string of HTML (previously only accepted plain text).
169 + The "emphasis" and "strongemphasis" configuration properties of
170 YAHOO.widget.MenuItem are no longer interpreted when building from
173 + All YAHOO.widget.MenuItem instances built from markup must have an <A> node
174 as the first child of its root <LI> node.
176 + When building YAHOO.widget.MenuItem instances from existing markup, the value
177 of the "text" property is set to the innerHTML of the menu item's <A> node.
179 + Deprecated the following YAHOO.widget.MenuItem configuration properties:
189 + ContextMenu works differently in Opera
190 --------------------------------------
191 Opera doesn't support the "contextmenu" DOM event used to trigger the display
192 of YAHOO.widget.ContextMenu instances. As a result, clicking the right mouse
193 button in Opera will not result in the display of a ContextMenu instance
194 as it would in IE, Gecko, and Safari. To work around this shortcoming, users
195 will need to do the following to trigger the display of
196 YAHOO.widget.ContextMenu instances in Opera:
198 - Opera for Windows: Hold down the control key while clicking with the
201 - Opera for Mac OS X: Hold down the command/Apple key while clicking with
202 the left mouse button.
204 + Focus highlight sticks in Opera
205 -------------------------------
206 In Opera focus is designated via the application of a background color
207 to an element's text node. When a Menu instance has focus in Opera, the
208 focus highlight can remain on a MenuItem instance even after it has blurred.
210 + ContextMenu instances cannot be invoked by clicking on Java Applets
211 -------------------------------------------------------------------
212 When a Java Applet is specified as the "trigger" element for a ContextMenu
213 instance it will not display when the Applet is clicked. This is not a
214 bug in the ContextMenu class, but rather a result of DOM events not bubbling
215 up from inside Java Applets. For more information on this issue see:
216 http://tech.groups.yahoo.com/group/ydn-javascript/message/12128
218 + Flash Movies appear on top of Menu instances
219 --------------------------------------------
220 Flash movies can appear on top of Menu instances in IE and Gecko-based
221 browsers. To fix this problem, set the "wmode" of the Flash movie to either
222 "transparent" or "opaque" as indicated below:
224 Via the <object> tag:
227 <param name="wmode" value="opaque">
231 <param name="wmode" value="transparent">
236 <embed wmode="transparent"> ... </embed>
237 <embed wmode="opaque"> ... </embed>
239 ** For more information see
240 http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15523
242 + Menu instances not rendered at correct z-index in IE
243 -------------------------------------------------------
244 In IE, when a Menu instance is rendered inside a relatively positioned
245 element the z-index of the Menu instance is now relative to its
246 relatively positioned parent element. This is not a bug in the
247 Menu class, but rather a bug in IE where relatively positioned elements
248 establish a new stacking context for their child nodes. To avoid this
249 bug is recommend that all Menu instances that need to be able to float
250 above any other element in the document be made direct descendants of the
253 ** For more information see
254 http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html
256 + Elements with scrollbars poke through Menu instances floating above them
257 ------------------------------------------------------------------------
258 There is a bug in Gecko-based browsers for Mac OS X where an element's
259 scrollbars will poke through absolutely positioned elements floating above
260 them. To fix this problem the "overflow" property of a Menu instance's
261 shadow element is toggled between "hidden" and "auto" (through the application
262 and removal of the "hide-scrollbars" and "show-scrollbars" CSS classes) as its
263 "visibility" configuration property is toggled between "false" and "true."
264 Therefore, the shadow element acts like a shim, blocking scrollbars from
265 poking through the Menu.
269 1) The "hide-scrollbars" and "show-scrollbars" CSS classes classes are
270 applied only for Gecko on Mac OS X and are added/removed to/from the
271 Menu's root HTML element (DIV) via the "hideMacGeckoScrollbars" and
272 "showMacGeckoScrollbars" methods of YAHOO.widget.Overlay.
274 2) This fix is only applied when using the "Sam" skin; the CSS for the
275 original Menu skin does not contain any rules for rendering the
278 3) Once the fix is applied the bug will reappear if the window loses focus.
279 This can be fixed via Javascript by hiding and showing the Menu instance
280 when the window receives focus:
282 YAHOO.util.Event.on(window, "focus", function () {
289 ** For more information see
290 https://bugzilla.mozilla.org/show_bug.cgi?id=187435
293 *** version 2.2.2 ***
295 Fixed the following bugs:
296 -------------------------
298 + "toString" method of MenuItem, MenuBarItem and ContextMenuItem classes will
299 no longer throw a JavaScript error when using the debug version
300 of the Event utility.
302 + "toString" method of Menu, MenuBar and ContextMenu classes will
303 no longer attempt to output the instance's id if it is not available.
305 + Logger statements output by debug version of MenuManager are now properly
306 categorized as "MenuManager"
310 *** version 2.2.1 ***
312 Added the following features:
313 -----------------------------
315 + Added the following methods to YAHOO.widget.Menu:
320 + Added the following Custom Events to YAHOO.widget.Menu:
324 + Added the following methods to YAHOO.widget.MenuManager:
325 - "getFocusedMenuItem"
328 + Added "hasFocus" method to YAHOO.widget.MenuItem
331 Fixed the following bugs:
332 -------------------------
334 + Menu instances no longer set focus to themselves by default when made
335 visible. Menus only receive focus in response to the following events:
336 - The user mouses down on a MenuItem instance
337 - The user tabs into a MenuItem instance
339 + Application of the "maxheight" configuration property is now correctly
340 deferred until the "render" event fires when Menu instance is being
343 + The "maxheight" configuration property can now be set multiple times without
344 a Menu instance restoring itself to its original default height.
346 + The "maxheight" configuration property can now be set on hidden Menu
347 instances that use lazy loading.
349 + Menu instances with a "width" configuration property set will now render
350 at the specified width rather than shrink wrapping to their contents.
352 + Menu item help text no longer wraps to the next line in Opera 9.
354 + Immediate submenus of a Menubar instance will no longer shift their position
355 to try and remain inside the confines of the browser's viewport.
357 + Lazy loaded ContextMenu instances now appear in the correct position when
358 they are made visible for the first time.
360 + MenuBar instances no longer throw JavaScript errors when navigating items with
361 submenus containing no active items using the keyboard.
363 + Replaced use of native "hasOwnProperty" method
364 with YAHOO.lang.hasOwnProperty.
366 + Rendered Menu instances will now update their width when items are added
369 + Mousing over a Menu instance in an IE window that does not have focus will
370 no longer cause the window to receive focus.
376 + "activeItem" property of YAHOO.widget.Menu now returns a reference to the
377 Menu's currently selected item.
379 + Added a "visible" CSS class that is applied to visible Menu instances.
381 + Refactored the Menu family to improve performance, especially when working
382 with a large number of instances in IE6.
386 *** version 2.2.0 ***
388 Added the following features:
389 -----------------------------
391 * Added two new methods to YAHOO.widget.Menu:
393 * "getItems" - Returns a flat array of the items in a menu.
395 * "clearContent" - Removes all of the content from the menu, including the
396 menu items, group titles, header and footer.
399 * Added three new configuration attributes to YAHOO.widget.Menu:
401 * "submenuhidedelay" - Number indicating the time (in milliseconds) that
402 should expire before a submenu is hidden when the user mouses out of a
403 menu item heading in the direction of a submenu. The value must be
404 greater than or equal to the value specified for the "showdelay"
405 configuration property.
407 * "maxheight" - Defines the maximum height (in pixels) for a menu before
408 the contents of the body are scrolled.
410 * "classname" - CSS class to be applied to the menu's root <div> element.
411 The specified class(es) are appended in addition to the default class as
412 specified by the menu's CSS_CLASS_NAME constant.
415 * Added new constants to YAHOO.widget.MenuItem:
417 * COLLAPSED_SUBMENU_INDICATOR_TEXT - String representing the text for the
418 <em> element used for the submenu arrow indicator.
420 * EXPANDED_SUBMENU_INDICATOR_TEXT - String representing the text for the
421 submenu arrow indicator element (<em>) when the submenu is visible.
423 * DISABLED_SUBMENU_INDICATOR_ALT_TEXT - String representing the text for
424 the submenu arrow indicator element (<em>) when the menu item is disabled.
426 * CHECKED_TEXT - String representing the text to be used for the checked
427 indicator element (<em>).
429 * DISABLED_CHECKED_TEXT - String representing the text to be used for the
430 checked indicator element (<em>) when the menu item is disabled.
433 * Added two new configuration attributes to YAHOO.widget.MenuItem:
435 * "onclick" - Object literal representing the code to be executed when the
436 button is clicked. Format:
439 fn: Function, // The handler to call when the event fires.
440 obj: Object, // An object to pass back to the handler.
441 scope: Object // The object to use for the scope of the handler.
444 * "classname" - CSS class to be applied to the menu item's root <li>
445 element. The specified class(es) are appended in addition to the default
446 class as specified by the menu item's CSS_CLASS_NAME constant.
449 * Added an "id" property to YAHOO.widget.MenuItem that represents the id of
450 the menu item's root <li> node. Although not a configuration attribute, this
451 property should be set via the object literal of configuration attributes
452 passed as the second argument to the constructor. If no value is
453 specified, then one will be generated using the "generateId" method of the
454 Dom utility (YAHOO.widget.Dom).
456 * Added a "trigger context menu event"
457 (YAHOO.widget.ContextMenu.triggerContextMenuEvent) that fires when the DOM
458 "contextmenu" event ("mousedown" for Opera) is fired by one of the elemeents
459 defined as a YAHOO.widget.ContextMenu instance's trigger.
461 * Added a "cancel" method to YAHOO.widget.ContextMenu that can be used to
462 cancel the display of a YAHOO.widget.ContextMen instance. This method
463 should be called within the scope of a "context menu" event handler for
464 one of the context menu's triggers
465 (YAHOO.widget.ContextMenu.triggerContextMenuEvent).
468 Fixed the following bugs:
469 -------------------------
471 * Users can now move diagonally from a menu item to its corresponding submenu
472 without the submenu hiding immediately.
474 * "destroy" method of YAHOO.widget.Menu now unsubscribes from the "text resize"
475 event (YAHOO.widget.Module.textResizeEvent).
477 * Browser progress bar no longer flashes when hovering over checked menu items
478 or menu items with submenus.
480 * Menu item submenu indicator image no longer jumps to the next line in
483 * Mouse events no longer fire in Firefox if a YAHOO.widget.Menu instance is
484 moved by script into a stationary mouse pointer.
486 * Modified "toString" method of YAHOO.widget.ContextMenuItem to return the
487 correct class name, as it was reporting as YAHOO.widget.MenuBarItem.
493 * Default value for the "showdelay" configuration attribute is now 250
495 * Modified code so that all Menu images are added via CSS background images.
496 As a result, the following constants and properties have been deprecated:
498 * YAHOO.widget.MenuItem.SUBMENU_INDICATOR_IMAGE_PATH
499 * YAHOO.widget.MenuItem.SELECTED_SUBMENU_INDICATOR_IMAGE_PATH
500 * YAHOO.widget.MenuItem.DISABLED_SUBMENU_INDICATOR_IMAGE_PATH
501 * YAHOO.widget.MenuItem.COLLAPSED_SUBMENU_INDICATOR_ALT_TEXT
502 * YAHOO.widget.MenuItem.EXPANDED_SUBMENU_INDICATOR_ALT_TEXT
503 * YAHOO.widget.MenuItem.DISABLED_SUBMENU_INDICATOR_ALT_TEXT
504 * YAHOO.widget.MenuItem.CHECKED_IMAGE_PATH
505 * YAHOO.widget.MenuItem.SELECTED_CHECKED_IMAGE_PATH
506 * YAHOO.widget.MenuItem.DISABLED_CHECKED_IMAGE_PATH
507 * YAHOO.widget.MenuItem.CHECKED_IMAGE_ALT_TEXT
508 * YAHOO.widget.MenuItem.DISABLED_CHECKED_IMAGE_ALT_TEXT
509 * YAHOO.widget.MenuItem.IMG_ROOT
510 * YAHOO.widget.MenuItem.IMG_ROOT_SSL
511 * YAHOO.widget.MenuItem.imageRoot
512 * YAHOO.widget.MenuItem.isSecure
516 *** version 0.12.2 ***
522 *** version 0.12.1 ***
524 Fixed the following bugs:
525 -------------------------
527 * Placed the call to the DOM "focus" method used by the MenuItem class inside
528 a zero-second timeout to resolve a race condition between menu positioning
529 and focusing of a menu item that resulted in the browser viewport
530 scrolling unnecessarily.
532 * Switched to JSMin for JavaScript compression to resolve issues with the
535 * Disabled menu item instances will no longer display a submenu if the item is
536 clicked or moused over.
538 * Can no longer select more than one item in a menu if using the keyboard and
539 mouse simultaneously.
541 * Calling the "destory" method on a menu will now unregister all of the menu's
542 submenus from the MenuManager.
548 Added the following features:
549 -----------------------------
551 * Added the YAHOO.widget.MenuManager singleton class.
553 * Added two new methods to YAHOO.widget.Menu:
555 * "addItems" - Adds an array of items to a menu.
557 * "getRoot" - Returns the root menu in a menu hierarchy.
559 * Added two new events to YAHOO.widget.Menu:
561 * "itemAddedEvent" - Fires when an item is added to a menu.
563 * "itemRemovedEvent" - Fires when an item is removed from a menu.
565 * Added two new properties to YAHOO.widget.Menu:
567 * "itemData" - Array of items to be added to the menu.
569 * "lazyLoad" - Boolean indicating if the menu's "lazy load" feature
572 * Added new configuration properties to YAHOO.widget.Menu:
574 * "hidedelay" - Hides the menu after the specified number of milliseconds.
576 * "showdelay" - Shows the menu after the specified number of milliseconds.
578 * "container" - The containing element the menu should be rendered into.
580 * "clicktohide" - Boolean indicating if the menu will automatically be
581 hidden if the user clicks outside of it.
583 * "autosubmenudisplay" - Boolean indicating if submenus are automatically
584 made visible when the user mouses over the menu's items.
586 * Added a "toString" method to YAHOO.widget.MenuItem, YAHOO.widget.MenuBarItem
587 and YAHOO.widget.ContextMenuItem that returns the class name followed by the
588 value of the item's "text" configuration property.
591 Fixed the following bugs:
592 -------------------------
594 * Setting a YAHOO.widget.ContextMenu instance's "trigger" configuration
595 property will remove all previous triggers before setting up the new ones.
597 * "destroy" method of YAHOO.widget.ContextMenu cleans up all DOM event handlers.
599 * Clicking on a menu item with a submenu no longer hides/collapses the
602 * Clicking an item's submenu indicator image no longer collapses the
609 * Deprecated the YAHOO.widget.MenuModule and YAHOO.widget.MenuModuleItem
610 classes. The Base classes are now YAHOO.widget.Menu and
611 YAHOO.widget.MenuItem.
613 * "addItem" and "insertItem" methods of YAHOO.widget.Menu now accept an
614 object literal representing YAHOO.widget.MenuItem configuration properties.
616 * "clearActiveItem" now takes an argument: flag indicating if the Menu
617 instance's active item should be blurred.
619 * Switched the default value of the "visible" configuration property for
620 YAHOO.widget.Menu to "false."
622 * Switched the default value of the "constraintoviewport" configuration
623 property for YAHOO.widget.Menu to "true."
625 * Overloaded the "submenu" configuration property for YAHOO.widget.MenuItem
626 so that it now can accept any of the following:
628 * YAHOO.widget.Menu instance
629 * Object literal representation of a menu
633 * "hide" and "show" methods of statically positioned menus now toggle the their
634 element's "display" style property between "block" and "none."
638 *** version 0.10.0 ***
644 * Some Firefox extensions disable the ability for JavaScript to prevent
645 the display of the browser's default context menu. These extensions
646 can cause the YUI ContextMenu to stop working. If you encounter this
647 problem, you can reset the context menu preference in Firefox back to
648 the default by making sure the "Disable or replace context menus"
649 preference is checked:
653 Preferences > Web Features >
654 Advanced... > Disable or replace context menus
658 Preferences > Context >
659 Advanced... > Disable or replace context menus
663 Tools > Options > Web Features >
664 Advanced... > Disable or replace context menus
668 Tools > Options > Context >
669 Advanced... > Disable or replace context menus
673 *** version 0.11.3 ***
675 Added the following features:
676 -----------------------------
678 * Added a "target" configuration property to the MenuModuleItem object that
679 allows the user to specify the target of an item's anchor element. Items
680 that make use of the "target" configuration property will require the user
681 to click exactly on the item's anchor element to navigate to the specified
684 * Items without a "url" property set will automatically hide their parent
685 menu instance(s) when clicked.
688 Fixed the following bugs:
689 -------------------------
691 * Items in a submenu should now navigate to their specified URL when clicked.
693 * Removed MenuBar's use of "overflow:hidden." This fixes an issue in Firefox
694 1.5 in which submenus of a Menubar instance cannot overlay other absolutely
695 positioned elements on the page.
697 * Submenus of a Menubar instance will now automatically have their iframe shim
700 * Statically positioned Menubar and Menu instances will now render with the
701 correct position and dimensions in Safari.
703 * MenuModuleItem's "focus" method now checks to make sure that an item's
704 "display" style property is not "none" before trying to set focus to its
707 * A ContextMenu instance will now hide all other ContextMenu instances before
710 * Removed the dead space in front of an item's submenu indicator image in IE.
711 This space was causing an item's submenu to flicker when the user hovered
718 * Moved the DOM event handlers for every menu from the root DIV node of each
719 instance to the document object. This change reduces the number of DOM event
720 handlers used by Menu to eight, improving the cleanup time required by the
725 *** version 0.11.0 ***
727 Added the following features:
728 -----------------------------
729 * Overloaded the "addItem" and "insertItem" methods of MenuModule to accept a
730 string or a MenuModuleItem instance
732 * Added the ability to define a MenuItem instance as being "checked"
735 Fixed the following bugs:
736 -------------------------
737 * Changing the path for the submenu indicator image of one MenuModuleItem
738 subclass will no longer affect other subclasses
740 * MenuItem instances built from existing markup without anchor tags will no
741 longer trigger a JavaScript error when clicked
743 * Modified the implementation of the "imageRoot" property for the
744 MenuModuleItem class so that it is set to a secure/non-secure path when the
745 object is instantiated
747 * Menu instances now resize in response to changes to the browser's font size
749 * Modified the propagation of the MenuModule class's "submenualignment"
750 configuration property so that it only applies to instances of the same type
752 * Adjusted the specificity of the style rule that controls the position of a
753 MenuItem instance's submenu indicator image to prevent it from wrapping in IE
755 * Specified a width and height for submenu indicator images in the Menu
756 stylesheet to ensure that Menu instances are always rendered at the correct
759 * Clicking a MenuItem instance will no longer trigger two HTTP GET requests
761 * Users can now control or shift-click on MenuItem links
766 * In the Menu stylesheet (menu.css), switched from using "first" class to
767 "first-of-type" class
769 * Changed case of MenuModuleItem class's "subMenuIndicator" property
770 to "submenuIndicator"