Opened 8 years ago

Closed 8 years ago

#7727 closed bug (notabug)

Selectors' orders for jQuery UI button

Reported by: Rashidi Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.button Version: 1.8.6
Keywords: Cc:
Blocked by: Blocking:

Description

Hello.

The following code failed to transform the link to a button.

<html>
<head>
        <link rel="stylesheet" type="text/css" media="screen" href="css/v/jqui/publisher-default.css" />
        <script type="text/javascript" src="js/v/jquery.js"></script>
        <script type="text/javascript" src="js/v/jquery-ui.js"></script>
        <script type="text/javascript">
        $(function() {
                $( "button, input:button, input:submit, a.button" ).button();
        });
        </script>
</head>
<body>
        <a href="#" class="button" id="i-am-a-link">Link</a>
        <br/>
        <button>foo</button>
</body>
</html>

However when I moved the selector button from being the first in the list. The script works.

<html>
<head>
        <link rel="stylesheet" type="text/css" media="screen" href="css/v/jqui/publisher-default.css" />
        <script type="text/javascript" src="js/v/jquery.js"></script>
        <script type="text/javascript" src="js/v/jquery-ui.js"></script>
        <script type="text/javascript">
        $(function() {
                $( "input:button, input:submit, button, a.button" ).button();
        });
        </script>
</head>
<body>
        <a href="#" class="button" id="i-am-a-link">Link</a>
        <br/>
        <button>foo</button>
</body>
</html>

Change History (2)

comment:1 Changed 8 years ago by Rashidi

Additional information. The bug occurs with Opera browser.

comment:2 Changed 8 years ago by Scott González

Resolution: invalid
Status: newclosed

This is a jQuery bug, not a jQuery UI bug. See #7094 and http://bugs.jquery.com/ticket/8468.

Note: See TracTickets for help on using tickets.