3
Fixed the following bugs:
4
-------------------------
6
+ Buttons of type "split" will no longer block the submission of a form when
7
the enter key is pressed to submit a form.
9
+ Button instances will no longer overflow the boundaries of their parent
10
element in IE 7 Strict Mode when the content of the parent element is scrolled
11
(via use of the CSS overflow property).
13
+ "click" event listeners registered via the "onclick" attribute will no longer
14
be called when the user presses the section of a Button of type "split"
15
responsible for showing the Button's Menu.
20
+ Hovering over MenuItems in a Button's Menu will no longer update the Button's
21
"selectedMenuItem" attribute. The "selectedMenuItem" attribute is now only
22
updated when the user clicks on a MenuItem. When the "selectedMenuItem"
23
attribute is set, a class name of "yui-button-selectedmenuitem" is added to
24
the <LI> element of the corresponding MenuItem instance.
29
Fixed the following bugs:
30
-------------------------
32
+ Clicking on the option region of a Button of "type" split will fire the
33
"option" event, but not "mousedown," "mouseup," "click," or "dblclick".
35
+ Buttons of type "radio" and "checkbox" will not override a value provided for
38
+ Returning false in an inline "submit" event handler for a form will now
39
prevent the form from being submitted when the form contains Button instances.
41
+ Pressing the enter key to submit a form containing Button instances will no
42
longer trigger a beep sound in Internet Explorer.
44
+ The Button widget no longer logs errors when strict error reporting is
47
+ Button instances are now automatically clicked when their corresponding
50
+ The name and value of selected MenuItems in submenus of a Button's Menu are
51
now part of their parent form's data when the form is submitted.
53
+ For Button's of type "menu" and "split" created using an existing <SELECT>
54
element: The name and value of the pre-selected MenuItem in a Button's Menu
55
are now part of their parent form's data when the form is submitted.
57
+ The "appendTo" event now correctly fires when the "container" attribute is
58
set to a node reference.
60
+ Simple forms with two fields: a Button of type "submit" and a text field will
61
no longer be submitted twice when the enter key is pressed.
63
+ Submitting a form by pressing the enter key will now result in a Button's
64
"click" event handlers getting called.
66
+ Buttons of type "menu" and "split" now consistently display their Menus
69
+ Button no longer logs a warning when a Button is created without an id.
72
Added the following features:
73
-----------------------------
75
+ Added a new "menumaxheight" attribute used to set the "maxheight"
76
configuration property of a Button's Menu.
78
+ Added a new "menuminscrollheight" attribute used to set the "minscrollheight"
79
configuration property of a Button's Menu.
81
+ Added a "menualignment" attribute attribute used to control how a Menu is
82
aligned to its corresponding Button.
84
+ Added a "yui-split-button-hoveroption" CSS class that is applied when the
85
user hovers the mouse over the "option" section of a split button.
91
+ Removed the rounded corners for IE 6 Quirks Mode and Strict Mode and IE 7
94
+ Changed the keyboard shortcut used to display the Menu for Button's of type
95
"split" to the down arrow key.
97
+ Passing a DOM element reference to the "container" attribute will no longer
98
result in the Button being appended to the container immediately. Use the
99
"appendTo" event to listen for when the Button will be appended to the element
100
specified as its container. To append a Button to an element in the DOM
101
immediately, use the "appendTo" method rather than the "container" attribute.
104
*** Version 2.5.2 ***
106
Fixed the following bugs:
107
-------------------------
109
+ Button instances no longer flicker in Firefox 3 when their "label" attributed
112
+ Scrolled Menus of Buttons whose type attribute is set to "menu" or "split" no
113
longer appear on top of their corresponding Button instance.
115
+ The keyboard shortcut responsible for triggering the display of the Menu for
116
Button instances of type "split" will no longer trigger the display of the
117
browser's default context menu in Opera.
121
*** Version 2.5.1 ***
127
*** Version 2.5.0 ***
129
+ Fixed issue where returning false inside the scope of a listener for attribute
130
"before" events (i.e "beforeCheckedChange") would not cancel the attribute's
135
*** Version 2.4.1 ***
141
*** Version 2.4.0 ***
143
Added the following features:
144
-----------------------------
146
+ Added a static method "YAHOO.widget.Button.getButton" that returns a Button
147
instance with the specified HTML element id.
150
Fixed the following bugs:
151
-------------------------
153
+ Removed the ".yui-skin-sam" CSS class name from style rules in the core
154
stylesheet so that it is now truly skin agnostic.
156
+ Updated the default text for tooltips for Buttons of type "radio" so that
157
they offer the correct instructional text.
159
+ Menus with grouped YAHOO.widget.MenuItem instances will now highlight
160
correctly when used with Button.
162
+ Buttons of type "link" now have the same default height as other Button
163
types in Internet Explorer.
165
+ Buttons of various types now line up correctly on the same line.
167
+ Menu is now truly an optional dependancy of Button.
169
+ Menus now render with the correct width when the "yui-skin-sam" CSS class
170
name is applied to an element other than the <BODY>.
174
*** Version 2.3.1 ***
176
Fixed the following bugs:
177
-------------------------
178
+ Purged the old 2.2.2 Button stylesheet and related image assets that was
179
mistakenly included in the 2.3.0 build.
181
+ Fixed an issue in Gecko where changing a Button instance's "label" attribute
182
after the Button had been created would not result in the Button redrawing at
183
a width to fit its content.
185
+ Fixed an issue where the singleton keypress event handler
186
(YAHOO.widget.Button.onFormKeyPress) registered for forms containing
187
Button instances of type "submit" was not removed from the form once all of
188
its child Button instances are destroyed.
190
+ Submitting a form by clicking on a MenuItem of a SplitButton's or MenuButton's
191
Menu will no longer result in a JavaScript error.
193
+ Modified how element tag names are compared to support XHTML applications.
195
+ Added code to remove the CSS class names representing the "hover," "focus,"
196
and "active" states when a Button instance is disabled.
201
Added the following features:
202
-----------------------------
204
+ Added a "focusmenu" configuration attribute that controls whether or not a
205
Button instance's menu will automatically be focused when made visible.
207
+ Added a "lazyloadmenu" configuration attribute that controls the value of
208
the "lazyload" configuration property of a Button's menu.
210
+ Added "menuclassname" configuration attribute that defines a CSS class name
211
to be applied to the root HTML element of a button's menu.
214
Fixed the following bugs:
215
-------------------------
217
+ Setting the "label" attribute of a Button of type "link" to a string with
218
a "www." prefix will no longer result in the value of the "href" property
219
being used for the "label" in IE.
221
+ Disabling a Button when its menu is visible will now result in the menu
224
+ Hidden field(s) created by a Button instance are now removed if the
225
submission of its parent form is cancelled.
227
+ If a Button instance is preceeded by another enabled HTML submit button
228
(<input type="submit" ...> or <button type="submit" ...>), it will no longer
229
create a hidden field representing its name and value when its parent form
232
+ If an HTML form contains a mix of YUI Buttons of type "submit" and standard
233
HTML submit buttons (<input type="submit" ...> or <button type="submit" ...>)
234
its "submit" event will no longer fire twice when it is submitted by the user
235
pressing the enter key while focus inside another HTML form control.
237
+ If all Button instances in a form are disabled, the form will no longer be
238
submitted when the user presses the enter key while focused inside another
241
+ The first enabled Button instance in a form now correctly adds its name and
242
value to the form's data set when the form is submitted by the user pressing
243
the enter key while focused inside another form control.
245
+ Fixed typo in the source file for the ButtonGroup class that was causing the
246
private variable "m_oButtons" to be declared as a global.
248
+ Switched to use of the CSS display type "-moz-inline-box" from
249
"-moz-inline-stack" for Gecko-based browsers so that the entire area of a
250
Button instance is clickable when it is rendered inside another inline
253
+ Added "yui-button" and "yui-[button type]-button" prefix to CSS classes to
254
sandbox Button styles.
260
+ Default value of "type" configuration attribute now "push" (was "button").
262
+ Type "menubutton" now "menu."
264
+ Type "splitbuton" now "split."
266
+ Added "addStateCSSClasses" method.
268
+ Added "removeStateCSSClasses" method.
270
+ Renamed protected property "_hiddenField" to "_hiddenFields."
272
+ Removed protected "submit" event handler named "_onFormSubmit."
274
+ Renamed public method "createHiddenField" to "createHiddenFields."
276
+ Added new "removeHiddenFields" method.
278
+ Renamed static method "YAHOO.widget.Button.onFormKeyDown"
279
to "YAHOO.widget.Button.onFormKeyPress."
281
+ Renamed "TAG_NAME" constant (YAHOO.widget.Button.prototype.TAG_NAME and
282
YAHOO.widget.ButtonGroup.prototype.TAG_NAME) to
283
"NODE_NAME" (YAHOO.widget.Button.prototype.NODE_NAME and
284
YAHOO.widget.ButtonGroup.prototype.NODE_NAME).
286
+ The "selectedMenuItem" configuration attribute now correctly gets/sets the
287
index of the selected MenuItem instance of the button's menu, rather than a
290
+ The "container" configuration attribute is now writeonce
292
+ The "menu" configuration attribute is now writeonce
294
+ The root element of each button's menu now will have two CSS classes
296
- The CSS class name specified by the "menuclassname" configuration
297
attribute (by default is "yui-button-menu")
298
- A type-specific class name (either "yui-split-button-menu"
299
or "yui-menu-button-menu")
301
+ "menu" configuration attribute now supports creation or use of
302
YAHOO.widget.Overlay in addition to previously supported
305
- To create a menu from existing markup using YAHOO.widget.Overlay, pass the
306
id or node reference of the HTML element to be used to create the Overlay
307
as the value of the "menu" configuration attribute.
309
- YAHOO.widget.Overlay instances passed as a value for the "menu"
310
configuration attribute need to be fully rendered.
312
- To create a menu from existing markup using YAHOO.widget.Menu, pass the
313
id or node reference of the HTML element to be used to create the menu
314
as the value of the "menu" configuration attribute and give the
315
HTML element the same class name as specified by
316
YAHOO.widget.Menu.prototype.CSS_CLASS_NAME.
318
- YAHOO.widget.Overlay instances used as a menu are by default not rendered
319
until they are are made visible for the first time. This behavior
320
can be changed so that they are rendered immediately by setting the value
321
of the "lazyloadmenu" configuration attribute to "false."
323
+ If you pass an element id for the value of the "menu" configuration
324
attribute, that node is now accessed immediately via the "get" method of the
325
Dom utility (YAHOO.util.Dom) as opposed to the "onContentReady" method of the
326
Event utility (YAHOO.util.Event).
328
+ Modified code to support a more generic markup format. Now any number of
329
HTML elements can exist between a Button's root HTML element and its button
330
node (be it an <A> or <BUTTON> element):
332
<ROOT_NODE> ... <BUTTON_NODE /> ... </ROOT_NODE>
334
+ A Button can now be initialized using any of the following six HTML patterns:
337
- <BUTTON> TEXT/HTML </BUTTON>
339
- <ROOT_NODE> ... <A> TEXT/HTML </A> ... </ROOT_NODE>
340
- <ROOT_NODE> ... <BUTTON> TEXT/HTML </BUTTON> ... </ROOT_NODE>
341
- <ROOT_NODE> ... <INPUT /> ... </ROOT_NODE>
343
+ The id of a Button instance can now match that of its source element.
347
1) All Buttons have a "yui-" prefix as opposed to "yui":
350
-------------------------
351
.yuibutton | .yui-button
354
2) Each Button type has its own class name with a "yui-" prefix and
355
"-button" suffix IN ADDITION TO the default "yui-button" class name:
358
------------------------------------------
359
.yuibutton.splitbutton | .yui-split-button
360
.yuibutton.menubutton | .yui-menu-button
362
* Allows for the definition of generic styles that apply to all buttons,
363
while providing a means for uniquely styling buttons of a specific type.
366
3) For states that are common to all Buttons, two classes are applied: a
367
generic class name (i.e. yui-button-[state]) and a type-specific state class
368
name (yui-[type]-button-[state]):
371
-------------------------------------------
372
.yuibutton.focus | .yui-button-focus
373
.yuibutton.radio.focus | .yui-radio-button-focus
375
* States common to all Button types are:
381
** Allows for the definition of generic styles that apply to all states of
382
all buttons, while providing a means for uniquely styling states for
383
buttons of a specific type.
386
4) Buttons of type "radio" and "checkbox" have two classes applied to
387
represent their "checked" state: a generic class name
388
(i.e. yui-button-checked) and a type-specific class
389
name (yui-[type]-button-checked):
392
-------------------------------------------
393
.yuibutton.checked | .yui-button-checked
394
.yuibutton.radio.checked | .yui-radio-button-checked
395
.yuibutton.checkbox.checked | .yui-checkbox-button-checked
397
** This allows for the definition of a universal style for all Buttons that
398
have a "checked" state or the ability to define a type-specific style for
402
5) States that are specific to a particular type only get a type-specific
403
state class name. Currently this only applies to the "splitbutton" type:
406
-------------------------------------------
407
.yuibutton.activeoption | .yui-split-button-activeoption
410
6) The "ie6" class name is removed.
413
*** Version 2.2.2 ***
418
*** Version 2.2.1 ***
420
Added the following features:
421
-----------------------------
423
+ Added "getHiddenField" method to YAHOO.widget.Button.
426
Fixed the following bugs:
427
-------------------------
429
+ Removed built-in use of the Event utility's "onAvailable" method from the
430
constructor of Button and ButtonGroup as it was preventing the addition of
431
event listeners on instances created from existing markup. Going forward
432
Button and ButtonGroup instances created from existing markup can only be
433
instantiated once their source HTML element is available in the DOM. The
434
Button examples illustrate how this can be accomplished.
436
+ Modified code so that disabled Button instances no longer fire DOM events.
438
+ Pressing the enter key while focused on a form field whose parent form
439
contains a Button instance of type "submit" will now automatically submit
440
the form using the first Button instance of type "submit".
442
+ Clicking a Button instance of type="submit" will now cause the Button's
443
parent form's "submit" event to fire.
445
+ Modified Button CSS so that the filter used to apply alpha transparency to
446
a Button's background PNG is only used by IE 6. The previous code was
447
enabling IE's Alpha image loader for IE 7 in Quirks mode.
449
+ Fixed documentation error for "getForm" method.
455
+ Made the "submitForm" method of YAHOO.widget.Button public (was
456
previously protected).
458
+ Removed "init" event and corresponding "oninit" configuration attribute
459
from YAHOO.widget.Button and YAHOO.widget.ButtonGroup.
461
+ Added the CSS class "ie6" to button.css. This classname is append to root
462
DOM element of Button instances created with IE 6. By default this class
463
is used to apply a filter that gives alpha transparency to a Button's
468
*** Version 2.2.0 ***
470
* Button Control introduced