# Remove grey background from disabled buttons in advanced options after clicking / tapping

**URL:** <https://forum.kurviger.com/t/remove-grey-background-from-disabled-buttons-in-advanced-options-after-clicking-tapping/4614>\
**Category:** Website\
**Tags:** solved, suggestion\
**Created:** [December 6, 2020, 9:44am UTC](https://forum.kurviger.com/t/remove-grey-background-from-disabled-buttons-in-advanced-options-after-clicking-tapping/4614 "2020-12-06T09:44:04Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![rumbrummer](https://forum.kurviger.com/user_avatar/forum.kurviger.com/rumbrummer/32/113_2.png) [@rumbrummer](https://forum.kurviger.com/u/rumbrummer)\
**Post date:** [December 6, 2020, 9:44am UTC](https://forum.kurviger.com/t/remove-grey-background-from-disabled-buttons-in-advanced-options-after-clicking-tapping/4614/1 "2020-12-06T09:44:04Z")

</div>

After toggling the buttons in advanced options, it is difficult (or not possible) to see the status, because the button stays the active element afterwards.

I saw this effect with Google Chrome App 86.0.4240.198 on Android 7. I am logged in as a “Kurviger Tourer”.  
Ferry on: ![image](https://forum.kurviger.com/uploads/default/original/2X/0/02dff0cfa9e3556596ad2daa58328fa64d44214d.png)

Ferry off: ![image](https://forum.kurviger.com/uploads/default/original/2X/9/9eb7c736b08a8e95a61890ac10d21245f4e7f047.png)

Ferry off after clicking on another button (“Place WPs on route”):  
 ![image](https://forum.kurviger.com/uploads/default/original/2X/2/216cf4c20ebaabe623b5acdaeb688d5f7f91afd9.png)

Therefore I propose to remove focus from the buttons ofter clicking / tapping ( element.blur() ).

Using Chrome on my Laptop this effect does not exist - the button toggles between white and grey without the need to click on an other button.

---

<div class="post-metadata">

**Author:** ![devemux86](https://forum.kurviger.com/user_avatar/forum.kurviger.com/devemux86/32/6239_2.png) [@devemux86](https://forum.kurviger.com/u/devemux86)\
**Post date:** [December 6, 2020, 10:59am UTC](https://forum.kurviger.com/t/remove-grey-background-from-disabled-buttons-in-advanced-options-after-clicking-tapping/4614/2 "2020-12-06T10:59:55Z")

</div>

Also some non toggle buttons (snap, reverse) keep their pressed icon unless click again outside?

---

<div class="post-metadata">

**Author:** ![rumbrummer](https://forum.kurviger.com/user_avatar/forum.kurviger.com/rumbrummer/32/113_2.png) [@rumbrummer](https://forum.kurviger.com/u/rumbrummer)\
**Post date:** [December 6, 2020, 11:30am UTC](https://forum.kurviger.com/t/remove-grey-background-from-disabled-buttons-in-advanced-options-after-clicking-tapping/4614/3 "2020-12-06T11:30:52Z")

</div>

Yes, example snap onroute:

 ![image](https://forum.kurviger.com/uploads/default/original/2X/b/b068cc9b540be78fae426089a9dc84bb78169831.png)  
But that is not hiding state information.

Edit: Thanks, good hint, it is not necessary to click an other button to remove focus, just click outside!

---

<div class="post-metadata">

**Author:** ![boldtrn](https://forum.kurviger.com/user_avatar/forum.kurviger.com/boldtrn/32/360_2.png) [@boldtrn](https://forum.kurviger.com/u/boldtrn)\
**Post date:** [December 6, 2020, 12:58pm UTC](https://forum.kurviger.com/t/remove-grey-background-from-disabled-buttons-in-advanced-options-after-clicking-tapping/4614/4 "2020-12-06T12:58:01Z")

</div>

Thanks for the proposal, I will have a look and see what can be done.

---

<div class="post-metadata">

**Author:** ![boldtrn](https://forum.kurviger.com/user_avatar/forum.kurviger.com/boldtrn/32/360_2.png) [@boldtrn](https://forum.kurviger.com/u/boldtrn)\
**Post date:** [December 24, 2020, 8:09am UTC](https://forum.kurviger.com/t/remove-grey-background-from-disabled-buttons-in-advanced-options-after-clicking-tapping/4614/5 "2020-12-24T08:09:09Z")

</div>

Thanks for the hints. I just deployed an improvement for this (should be live in 10 minutes or so). Let me know if this fixes the situation or if you are still seeing issues?

---

<div class="post-metadata">

**Author:** ![rumbrummer](https://forum.kurviger.com/user_avatar/forum.kurviger.com/rumbrummer/32/113_2.png) [@rumbrummer](https://forum.kurviger.com/u/rumbrummer)\
**Post date:** [December 24, 2020, 11:18am UTC](https://forum.kurviger.com/t/remove-grey-background-from-disabled-buttons-in-advanced-options-after-clicking-tapping/4614/6 "2020-12-24T11:18:15Z")

</div>

I have just tested it. Although I cleared the browser cache, there seems to be no significant change:

Ferry on after tapping button:

 ![ferry_on_act](https://forum.kurviger.com/uploads/default/original/2X/5/58b44469fcff32a72e98a26889879222e4333a81.jpeg)

Ferry on after tapping elsewhere:

 ![ferry_on_blur](https://forum.kurviger.com/uploads/default/original/2X/0/0b9b1b2d18c841d292d65af5d125864401c25f92.jpeg)

Ferry off after tapping button:

 ![ferry_off_act](https://forum.kurviger.com/uploads/default/original/2X/7/7af3809cb922e92cd3603779ce0b244c352aa099.jpeg)

Ferry off after tapping elsewhere:

 ![ferry_off_blur](https://forum.kurviger.com/uploads/default/original/2X/c/cbb5b81c61fd5731b3320e2ace776f64eda229f3.jpeg)

It seems that the button still has the focus until I tap on an other button or somewhere else 🤔

---

<div class="post-metadata">

**Author:** ![boldtrn](https://forum.kurviger.com/user_avatar/forum.kurviger.com/boldtrn/32/360_2.png) [@boldtrn](https://forum.kurviger.com/u/boldtrn)\
**Post date:** [December 28, 2020, 10:06am UTC](https://forum.kurviger.com/t/remove-grey-background-from-disabled-buttons-in-advanced-options-after-clicking-tapping/4614/7 "2020-12-28T10:06:37Z")

</div>

Unfortunately it’s not 100% perfect, but if you compare it to your fist screenshots, it’s already a lot better 🙂?

---

<div class="post-metadata">

**Author:** ![rumbrummer](https://forum.kurviger.com/user_avatar/forum.kurviger.com/rumbrummer/32/113_2.png) [@rumbrummer](https://forum.kurviger.com/u/rumbrummer)\
**Post date:** [December 28, 2020, 11:32am UTC](https://forum.kurviger.com/t/remove-grey-background-from-disabled-buttons-in-advanced-options-after-clicking-tapping/4614/8 "2020-12-28T11:32:38Z")

</div>

> [@rumbrummer](#):
>
> Ferry on after tapping button:
> 
> ![ferry_on_act](https://forum.kurviger.com/uploads/default/original/2X/5/58b44469fcff32a72e98a26889879222e4333a81.jpeg)
> 
> …
> 
> Ferry off after tapping button:
> 
> ![ferry_off_act](https://forum.kurviger.com/uploads/default/original/2X/7/7af3809cb922e92cd3603779ce0b244c352aa099.jpeg)

Hmmmm - perhaps the order in my previous post is not optimal.  
Comparing “Ferry on” with “Ferry off”, both directly after tapping button, I still can not see a difference

---

<div class="post-metadata">

**Author:** ![rumbrummer](https://forum.kurviger.com/user_avatar/forum.kurviger.com/rumbrummer/32/113_2.png) [@rumbrummer](https://forum.kurviger.com/u/rumbrummer)\
**Post date:** [December 28, 2020, 1:58pm UTC](https://forum.kurviger.com/t/remove-grey-background-from-disabled-buttons-in-advanced-options-after-clicking-tapping/4614/9 "2020-12-28T13:58:21Z")

</div>

Hi,

I checked [kurviger.de](http://kurviger.de) with Opera and Firefox on Android: With Opera the behaviour is the same as in Chrome: I can not see the Option state until tapping somewhere else, with Firefox I can see a slight difference.

I inspected the “Avoid Ferries” button (to be precise: it is a ‘label’ element) via Chrome USB debugging, there are 3 styles in  
[https://kurviger.de/dist/main.css?v=kv0fccece84aef0da2195d723a108a2888ddad309b](https://kurviger.de/dist/main.css?v=kv0fccece84aef0da2195d723a108a2888ddad309b)  
which lead to grey background color, even if the option “Avoid Ferries” is disabled:

1. ------------------- style --------------------------------  
.btn-default.active.focus, .btn-default.active:focus, .btn-default.active:hover, .btn-default:active.focus, .btn-default:active:focus, .btn-default:active:hover, .open\>.btn-default.dropdown-toggle.focus, .open\>.btn-default.dropdown-toggle:focus, .open\>.btn-default.dropdown-toggle:hover {  
color: #333;  
background-color: #d4d4d4;  
border-color: #8c8c8c;  
}  
The selector matches due to “.btn-default:active:hover” - with chrome on touch devices the pseudo classes :active" and “:hover” seem to stay valid also after tapping.

2. ------------------- style --------------------------------  
.btn-default.active, .btn-default:active, .open\>.btn-default.dropdown-toggle {  
color: #333;  
background-color: #e6e6e6;  
background-image: none;  
border-color: #adadad;  
}

The selector matches due to “.btn-default:active” - with chrome on touch devices the pseudo classes :active" and “:hover” seem to stay valid also after tapping.

1. ------------------- style --------------------------------  
.btn-default:hover {  
color: #333;  
background-color: #e6e6e6;  
border-color: #adadad;  
}

The selector matches due to “.btn-default:hover” - with chrome on touch devices the pseudo classes :active" and “:hover” seem to stay valid also after tapping.

Remark: It is a little bit confusing: There is a class “active” (selector: .active), which is used to determine if the option is enabled or not, and the pseudo class “active” (selector: :active) which selects an active HTML element - at the beginning I mixed it up.

From my point of view it would be useful to remove the “:active” selectors because I see no real benefit of a different button style during click even on PC / Mac etc…  
And the hover selector should be used only for “not-touch-devices” - as far as I understand on touch devices the :hover selector is useless anyway.

Last remark: My previous proposal to use the blur() function seems not to work: Neither entering “document.getElementById(‘avoid\_ferries’).blur()” nor entering “document.activeElement.blur()” in the developer console removed the grey background - the focus was removed, but the blur() function had no impact on the :hover selection …

---

<div class="post-metadata">

**Author:** ![boldtrn](https://forum.kurviger.com/user_avatar/forum.kurviger.com/boldtrn/32/360_2.png) [@boldtrn](https://forum.kurviger.com/u/boldtrn)\
**Post date:** [December 29, 2020, 4:13pm UTC](https://forum.kurviger.com/t/remove-grey-background-from-disabled-buttons-in-advanced-options-after-clicking-tapping/4614/10 "2020-12-29T16:13:32Z")

</div>

Thanks for investigating. I will take another look and see what can be done.

> [@rumbrummer](#):
>
> From my point of view it would be useful to remove the “:active” selectors because I see no real benefit of a different button style during click even on PC / Mac etc…  
> And the hover selector should be used only for “not-touch-devices” - as far as I understand on touch devices the :hover selector is useless anyway.

That’s not something I invented, that’s how browsers work. It’s called pseudo class. You can read more bout that here: [Pseudo-classes - CSS: Cascading Style Sheets | MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes)

While for Kurviger some these pseudo classes are not that important, they are very important in general. Especially when using screen readers or keyboard navigation. One example can be found here: [http://outlinenone.com/](http://outlinenone.com/) there are different issues when you start to mess with default browser behavior - most things are there for a reason 😉

---

<div class="post-metadata">

**Author:** ![rumbrummer](https://forum.kurviger.com/user_avatar/forum.kurviger.com/rumbrummer/32/113_2.png) [@rumbrummer](https://forum.kurviger.com/u/rumbrummer)\
**Post date:** [December 29, 2020, 5:58pm UTC](https://forum.kurviger.com/t/remove-grey-background-from-disabled-buttons-in-advanced-options-after-clicking-tapping/4614/11 "2020-12-29T17:58:40Z")

</div>

> [@boldtrn](#):
>
> While for Kurviger some these pseudo classes are not that important, they are very important in general.

Of course I do not deny the sense of the pseoudo classes in general!

But from my point of view the benefit of the pseudo class :active is small, even on a pointing device: It is used to change the look of an element during click on it on a - after releasing mouse button that look disappears again (different to pseudo class :focus, which selects the element in focus - useful for keyboard navigation on a website. Sorry for choosing confusing thread heading, at the beginning I thought that the focus was the reason). But it seems that with Opera and Chrome on touch device the pseudo class :active stays valid even after removing finger from screen ☹

And the :hover class can not work on a touch device, because there is no pointer which can be moved over an element (as also described in the link from you above) - so it could be separated via a media query “@media (pointer: fine)” to prevent the behaviour of Chrome and Opera on touch devices (from my point of view the behaviour of Opera and Chrome is wrong - but I see nearly no chance to change that).

---

<div class="post-metadata">

**Author:** ![rumbrummer](https://forum.kurviger.com/user_avatar/forum.kurviger.com/rumbrummer/32/113_2.png) [@rumbrummer](https://forum.kurviger.com/u/rumbrummer)\
**Post date:** [December 29, 2020, 6:10pm UTC](https://forum.kurviger.com/t/remove-grey-background-from-disabled-buttons-in-advanced-options-after-clicking-tapping/4614/12 "2020-12-29T18:10:31Z")

</div>

I changed the confusing thread heading - I hope this one is better.

---

<div class="post-metadata">

**Author:** ![boldtrn](https://forum.kurviger.com/user_avatar/forum.kurviger.com/boldtrn/32/360_2.png) [@boldtrn](https://forum.kurviger.com/u/boldtrn)\
**Post date:** [December 29, 2020, 6:11pm UTC](https://forum.kurviger.com/t/remove-grey-background-from-disabled-buttons-in-advanced-options-after-clicking-tapping/4614/13 "2020-12-29T18:11:26Z")

</div>

> [@rumbrummer](#):
>
> But it seems that with Opera and Chrome on touch device the pseudo class :active stays valid even after removing finger from screen ☹

Yes, but there isn’t much I can do to change browser behavior, without some serious intrusions that could lead to other issues 🙂. So I am not sure if we should go down that road.

I just found an open issue (from 2014) on the chromium bug tracker, this might be related to your proposal: [https://bugs.chromium.org/p/chromium/issues/detail?id=370155](https://bugs.chromium.org/p/chromium/issues/detail?id=370155)

---

<div class="post-metadata">

**Author:** ![rumbrummer](https://forum.kurviger.com/user_avatar/forum.kurviger.com/rumbrummer/32/113_2.png) [@rumbrummer](https://forum.kurviger.com/u/rumbrummer)\
**Post date:** [June 22, 2021, 7:29am UTC](https://forum.kurviger.com/t/remove-grey-background-from-disabled-buttons-in-advanced-options-after-clicking-tapping/4614/14 "2021-06-22T07:29:17Z")

</div>

This topic has been improved by the new design

> [@\[Website\] Fresh look for the website / Neues Design für die Webseite](https://forum.kurviger.com/t/website-fresh-look-for-the-website-neues-design-fur-die-webseite/5974):
>
> [Der deutsche Text kommt weiter unten] The initial design of the Kurviger website has been created over 5 years ago. Ever since new features were added, and the UI was slowly filled with buttons and options to continuously add and refine features. Therefore it was time to rethink the design, to fit all the new features that were added over the years, but also to have enough room for future features. I am really excited to show you the new design. [Screenshot 2021-06-21 at 20.18.49] What you …

From my point of view it is solved 👍

---

<div class="post-metadata">

**Author:** ![boldtrn](https://forum.kurviger.com/user_avatar/forum.kurviger.com/boldtrn/32/360_2.png) [@boldtrn](https://forum.kurviger.com/u/boldtrn)\
**Post date:** [June 22, 2021, 7:29am UTC](https://forum.kurviger.com/t/remove-grey-background-from-disabled-buttons-in-advanced-options-after-clicking-tapping/4614/15 "2021-06-22T07:29:56Z")

</div>

Perfect, thanks for the update!
