Closed MarkusLeupold closed 2 years ago
Here are two screenshots of the bug.
I chose one "Glas" of "Crepes" pressing the "G" button on my keyboard:
But when I click on the dropdown, I can't chose "Glas":
@MarkusLeupold Did you receive two error 500 responses because of this issues? I was warned about two 500s in the server error log.
Some quick notes:
Could this be a bug in Chromium or Bootstrap?
Currently we use jQuery .toggle()
to show/hide the select options. Is that a valid way of disabling option fields?
@dboehmer When I noticed the issue, I didn't try to submit the false unit (But thinking about it now, I wonder that I did not do that. Normally I like to check out what happens in such cases).
But I remember that I actually did get one server-side error in the same Coocook session yesterday. Maybe, I already achieved to select an unavailable unit before and didn't notice the issue at that time.
I just checked out the code in dev tools:
<option>
elements for all units inside the <select>
element. For all units that are not available for the chosen ingredient, the <option>
element simply has display: none
<option>
s are still present<option>
element is not displayed, because this only affects the element in the dropped-down list itself. The display
property isn't for completely making elements unavailable in DOM—just to make them not visible.How to solve this:
<option>
s inside the <select>
, that are actually available<option>
's display
property, this should be easily done
This is a bug of coocook.org
When I control the recipe edit view with my keyboard, I can choose units from the "Unit" dropdown that are not visible inside the dropped down list after clicking it.
How to recreate this bug / Exact circumstances under which the bug occured
Subjective impression of this bug
It seems like you can choose any unit of a project for any ingredient inside a recipe of this project using keyboard controls—independent from which units are actually set up to be available for this unit.