Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Title attribute on select tag not honored #977

Open
thdoan opened this issue Mar 22, 2015 · 9 comments
Open

Title attribute on select tag not honored #977

thdoan opened this issue Mar 22, 2015 · 9 comments
Milestone

Comments

@thdoan
Copy link

thdoan commented Mar 22, 2015

It seems like the plugin is ignoring the 'title' attribute in the select tag and instead setting the title to the value of the currently selected option. Having the title tooltip set to the currently selected option is not very useful since the user can already see the value that's currently selected. It would be better to honor the title attribute in the select tag if it exists.

@qnxor
Copy link

qnxor commented Mar 31, 2015

I just came here to open an issue about this. This is needed. It also forces more complicated error checking since the first option is being selected, instead of none.

@qnxor
Copy link

qnxor commented Mar 31, 2015

A workaround I just found is to add the first option as:

<option data-hidden="true">Select an option ...</option>

@caseyjhol
Copy link
Member

See #639

@qnxor
Copy link

qnxor commented Apr 11, 2015

Well, yes, but the docs are misleading: http://silviomoreto.github.io/bootstrap-select/#titleMultiples ... the "title" attribute alone does nothing.

@caseyjhol
Copy link
Member

See 0351bd8.

@nickrivadeneira
Copy link

Neither the linked PR nor the linked commit seem to address the original issue. The title attribute is not being copied over.

If I have a select tag:

<select title="Some title">...</select>

I'd expect (based on this comment in the source) the generated button to be:

<button title="Some title" data-toggle="dropdown" ...>

But it does not seem to work.

@thdoan
Copy link
Author

thdoan commented Aug 26, 2016

I've not been keeping track of the main branch because I had already fixed this issue (along with some other enhancements) in my fork way back. You can see a demo of the new title attribute behavior here (under Single Select):

http://thdoan.github.io/bootstrap-select/examples.html

@caseyjhol caseyjhol reopened this Aug 26, 2016
@caseyjhol
Copy link
Member

I think we need to add support for a separate placeholder attribute.

@caseyjhol
Copy link
Member

The placeholder option was added in https://github.com/snapappointments/bootstrap-select/releases/tag/v1.14.0-beta and existing title functionality has been deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants