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

Change text's color back to original which is black #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wujiang
Copy link

@wujiang wujiang commented Dec 19, 2012

No description provided.

@MSchmidt
Copy link
Owner

Sorry, I don't get what this is doing. On focus the field restores its original color already. Also, if you don't mind me asking: in what kind of project are you using this? This library didn't get updated in quite some time, since mootools 1.2 is kinda old by now.

@wujiang
Copy link
Author

wujiang commented Dec 19, 2012

My bad. I should have explained it in details.

Suppose you have a input field which will use a date picker to insert date string. When you click on the date picker to pick up a date, the event is on blur. In this case, the date text color is set to be this.options.color.

We're using it for our products at Truveris.com which is a pharmaceutical SaaS provider.

@MSchmidt
Copy link
Owner

Hmm ok. I guess when using a datepicker no event is triggered at all right now. Because on blur would only change to this.options.color if the input field is empty. But since the datepicker populated the field this won't happen anyway. So I guess what may happen is that it just keeps the color from the initialization. Does this sound about right?

@wujiang
Copy link
Author

wujiang commented Dec 20, 2012

You are right. It will keep the color from the initialization. In the initialization, when this.activatePlaceholder() is called, this.element.get('value') == this.placeholder, thus it will set the text color to this.options.color. As you said, it will keep this color when a date is picked.

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

Successfully merging this pull request may close these issues.

2 participants