Here is my code:
.buttons {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.button {
padding: 5px;
background-color: rgb(200, 200, 200);
}
<div class="buttons">
<div class="button">
One
</div>
<div class="button">
Two
</div>
<div class="button" tabindex="0" contenteditable="true" spellcheck="false">
Three
</div>
</div>
Now, if I click on the right side of the third button, not on the button anymore, just somewhere in the space on the right side, then still the third button gets activated. Why? This is so weird!
It happens only once!
And it helps to use inline-flex
instead, but I need flex
, and then it still happens if I click in the little space on the left side of the button to the next one.