Ticket #2532251 (accepted defect)

Reporter


Rüdiger Schulz
Opened: 05/3/12
Last modified: 03/15/13
Status: accepted
Type: defect

Owner


Derek Gathright
Target Release: BACKLOG
Priority: P3 (normal)
Summary: ToggleButton widget does not render a type attribute
Description:

If you apply the ToggleButton widget to a button, a type attribute is not applied to the rendered node. This applies both to the button tag and the input tag with type="button". As a result, a submit
button is rendered, as this is the default type for the button tag.

This is not a desired behaviour, especially with a toggle button, where you want to add some specific functionality by listening to "pressedChange" events, and not submit the form.

I fixed this by setting the type attribute in a custom renderUI function, but I assume that this should be default behaviour.

var button3 = new Y.ToggleButton({
srcNode:'#button3'
});
button3.renderUI = function() {
this.get('contentBox').setAttribute("type", 'button');
};
button3.render();

Type: defect Observed in Version: 3.5.0
Component: Button Severity: S3 (normal)
Assigned To: Derek Gathright Target Release: BACKLOG
Location: Library Code Priority: P3 (normal)
Tags: Relates To:
Browsers: All
URL: http://www.2rue.de/stuff/yui_togglebutton_bug.html
Test Information:

Attachments

Attachment #1: yui_togglebutton_bug.html (download)

Change History

Rüdiger Schulz

Posted: 05/3/12
  • browser changed from Firefox - Latest,Opera,Chrome to All

Derek Gathright

YUI Developer

Posted: 05/4/12
  • location changed to Library Code
  • milestone changed to 3.6.0
  • priority changed to P3 (normal)
  • status changed from new to accepted

Derek Gathright

YUI Developer

Posted: 05/4/12
  • sprint changed to backlog

Rüdiger Schulz

Posted: 05/4/12

Other tag attributes, like tabindex, accesskey or class are not copied over to the button tag created by the widget.

Derek Gathright

YUI Developer

Posted: 07/21/12
  • milestone changed from 3.6.0 to 3.7.0

Jenny Donnelly

YUI Developer

Posted: 08/1/12
  • milestone changed from 3.7.0 to 3.6.x

Moving 3.7.0 bugs to 3.6.x for triage.

Jenny Donnelly

YUI Developer

Posted: 09/19/12
  • milestone changed from 3.6.x to 3.CURRENT.NEXT

Moving from 3.6.x to 3.CURRENT.NEXT

Derek Gathright

YUI Developer

Posted: 09/24/12
  • milestone changed from 3.CURRENT.NEXT to 3.NEXT

Derek Gathright

YUI Developer

Posted: 03/15/13
  • milestone changed from 3.NEXT to BACKLOG