Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

CSS class is not copied from <select> tag to a button element #5308

Closed
@skozyr

Description

@skozyr

If one create Select component with a custom CSS class:

<select id="s1" data-theme='a' data-icon='forward' data-native-menu="false" tabIndex="1" class='customclass'>
    <option value='Veni' selected="selected">
        Veni
    </option>
    <option value='Vidi'>
        Vidi
    </option>
    <option value='Vici'>
        Vici
    </option>
</select>

Sample

Then JQM wraps this <select> component and creates <a ...> element before it.
See jquery.mobile-1.2.0.js at lines 8054-8065

button = this.button
    .insertBefore( this.select )
    .buttonMarkup( {
        theme: options.theme,
        icon: options.icon,
        iconpos: iconpos,
        inline: inline,
        corners: options.corners,
        shadow: options.shadow,
        iconshadow: options.iconshadow,
        mini: mini
    });

But unfortunately class assigned to original <select > element is not copied to button. JQM creates <a ...> element without class "customclass".
I think this is wrong behavior. It could be fixed adding

button.addClass( this.select.getAttr('class') );

after line 8065 in jquery.mobile-1.2.0.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions