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

Update to select menu placeholder logic#3152

Closed
lukeb wants to merge 1 commit intojquery-archive:masterfrom
lukeb:master
Closed

Update to select menu placeholder logic#3152
lukeb wants to merge 1 commit intojquery-archive:masterfrom
lukeb:master

Conversation

@lukeb
Copy link
Contributor

@lukeb lukeb commented Nov 23, 2011

... option. Also remove getAttribute('value') in favor of $this.val()

…ect option. Also remove getAttribute('value') in favor of $this.val()
@johnbender
Copy link
Contributor

@lukeb

Thanks for the submission.

What issue are you addressing here? I'm having a difficulty figuring it out from the alterations, commit msg, and pull request description.

[edit] aside from not using .val which is odd, but doesn't help me understand the other alterations.

@lukeb
Copy link
Contributor Author

lukeb commented Dec 12, 2011

Currently, even if you add the data-placeholder="false" attribute to a select element, it still treats it as a placeholder if it matches the other logic checks. This is why we need to use $this.jqmData( "placeholder" ) !== false for the check first.

@johnbender
Copy link
Contributor

@lukeb

I think the idea is that if you don't want a given element to be the placeholder you should define another element as the placeholder explicitly. I'm going to close this one.

@johnbender johnbender closed this Apr 2, 2012
@lukeb
Copy link
Contributor Author

lukeb commented Apr 3, 2012

Please reopen. You should be able to omit specific select elements from becoming a placeholder. The current logic is flawed, as you may not want an element to be the placeholder, even if it meets the current logic to setting to a placeholder. Please take a look at the diff and compare the old code with the new.

Also, this pull requests swaps out getAttribute("value") in favor of val();

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants