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

The zoom button focus get left on #85

Closed
bwyss opened this issue Oct 27, 2016 · 4 comments
Closed

The zoom button focus get left on #85

bwyss opened this issue Oct 27, 2016 · 4 comments

Comments

@bwyss
Copy link

bwyss commented Oct 27, 2016

The zoom button focus get left on when you click to zoom

zoom

@jonataswalker
Copy link
Collaborator

I'm afraid you'll have to describe a bit more of what's happening.

@bwyss
Copy link
Author

bwyss commented Oct 28, 2016

Hi, sorry for that.
Wow, I just realized that this is an openlayers 3 issue and not introduced by the geocoder.

The issue description: when you click to zoom, each click event on the zoom button will make the zoom button show the 'focus' (a blue border around the button). The focus should not persist after the click event IMHO.

This has a bad effect with the geocoder, when you click to open the geocoder the focus is off, and then when you click a second time to close the geocoder the focus is then left on. IIHO this is incorrect.

I will take up this issue with openlayers.

Cheers

@jonataswalker
Copy link
Collaborator

Hmm, weird! Maybe a fiddle would help.

Closing for now.

@bwyss
Copy link
Author

bwyss commented Oct 28, 2016

Just figured it out, just need to add this to your css to make things right:

button:focus {
  outline: 0;
}

.ol-control {
    background-color: none;
    border-radius: 4px
}

.ol-control:hover {
    background-color: none;
}
.ol-control button:focus {
    text-decoration: none;
    background-color: #6A90B6;
}

Here is the normal behavior (of the zoom button css): http://jsfiddle.net/YoannBureau/f0z15rgj/
Here is the better behavior (again IMHO): http://jsfiddle.net/ydar2w65/

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