Fomantic-UI
Fomantic-UI copied to clipboard
[Dropdown] Using serialized JSON as value prevent the select value from being updated.
Bug Report
Steps to reproduce
- Selection Option A
- Submit
Expected result
Select value is should be updated according to the option value.
Actual result
Select value is not updated according to the option value.
Testcase
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/semantic.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/semantic.min.css" rel="stylesheet">
<title>Demo</title>
</head>
<body>
<form method="get" accept-charset="utf-8">
<select name="select" id="select">
<option value='{"foo": "bar"}'>Option A</option>
<option value='{"foo2": "bar2"}'>Option B</option>
<option value='1'>Option C</option>
</select>
<button>Submit</button>
</form>
<script>$("#select").dropdown({
debug: true,
verbose: true
})</script>
</body>
</html>
Screenshot (if possible)
Version
2.9.3 on Firefox 122.0.1
I don't see the investigation being that hard, can we get some update on this?
If you need additional information, I'll be happy to provide them.
@thoughtsunificator I don't see the problem that you are describing. The screenshots that you have attached also do not match what you are describing.
For starters, maybe you can submit a fiddle like this. I made that to be similar to the testcase that you have provided, with a bit of adjustments. Feel free to modify that so you can replicate your issue.
Fixed by #3258