Open mjross opened 7 years ago
Looking at the source the logic for opts.response seems very flawed all the way through. I'll make this bug about removing that option altogether, I can't see it serving a logical purpose, and if there is one it should probably be facilitated better.
The documentation – and apparently also the code – for that option does seem quite flawed, but I do see value in having an option that can set which button is to be the default. Rather than eliminating it, it may be better to improve and clarify its functionality.
The documentation for the require("ko/dialogs").confirm() property
response
is misleading:That makes it sound as though the programmer should set the property to "Yes" or "No". Some example code illustrates the problem (note that assert() is just a simple utility function I use in all my unit-test code):
More clear would be something like: