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

Arrow indicator #2

Open
thisconnect opened this issue Dec 15, 2016 · 1 comment
Open

Arrow indicator #2

thisconnect opened this issue Dec 15, 2016 · 1 comment

Comments

@thisconnect
Copy link

Hi, this is a nice polyfill. Do you still use it yourself?

Would it be possible to implement the arrow on focus to indicate that there are options?

@tdolphin
Copy link

tdolphin commented Jan 11, 2017

To show the options on focus, in the function buildlist, I changed the line isFound to

var isFound = (query.length<1) || (query.length && item.innerText.toLowerCase().indexOf( query ) > -1);

For the arrow, I added a span with class darrow after the input

<input type="text" list="states"><span class="darrow"></span>
.darrow:after{
	content: '';
	display: inline-block;
	position: relative;
	top: 3px;
	left: -16px;
	width: 0;
	height: 0;
	border-top: 5px solid black;
	border-right: 5px solid transparent;
	border-bottom: 5px solid transparent;
	border-left: 5px solid transparent;
}

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

2 participants