mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +03:00
Bugfix: compose mail select contacts for cc/bcc failed
Cleanup: Inputosaurus and Knockout Change: Knockout domData now uses WeakMap Replaced: Knockout domManipulation with a documentFragment
This commit is contained in:
parent
fe7c7fede4
commit
ebe2c0536f
23 changed files with 410 additions and 889 deletions
13
vendors/knockout/src/binding/selectExtensions.js
vendored
13
vendors/knockout/src/binding/selectExtensions.js
vendored
|
|
@ -36,25 +36,22 @@
|
|||
}
|
||||
break;
|
||||
case 'SELECT':
|
||||
if (value === "" || value === null) // A blank string or null value will select the caption
|
||||
value = undefined;
|
||||
var selection = -1;
|
||||
// A blank string or null value will select the caption
|
||||
var selection = -1, noValue = ("" === value || null == value);
|
||||
for (var i = 0, n = element.options.length, optionValue; i < n; ++i) {
|
||||
optionValue = ko.selectExtensions.readValue(element.options[i]);
|
||||
// Include special check to handle selecting a caption with a blank string value
|
||||
if (optionValue == value || (optionValue === "" && value === undefined)) {
|
||||
if (optionValue == value || (optionValue === "" && noValue)) {
|
||||
selection = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (allowUnset || selection >= 0 || (value === undefined && element.size > 1)) {
|
||||
if (allowUnset || selection >= 0 || (noValue && element.size > 1)) {
|
||||
element.selectedIndex = selection;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if ((value === null) || (value === undefined))
|
||||
value = "";
|
||||
element.value = value;
|
||||
element.value = (value == null) ? "" : value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue