-
Notifications
You must be signed in to change notification settings - Fork 725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cancel and OK buttons are the wrong way around #41
Comments
This is dependent on the OS. Mac OS X uses primary action (confirm) on the right, secondary action (cancel) on the left. Windows does the opposite. The library should presumably match the OS it's running on. |
I agree this could be a nice feature since it would mimic the native dialogs - but from a user experience, I'd rather have consistency. The goal is to mimic the native dialogs as much as possible, but also aim to improve the user experience where possible. I'll leave open for discussion - and see where this goes. |
I bet the agree or ok button always should be on the right side |
Perhaps it could be configurable? Keeping the existing behaviour by default, so it doesn't break anything. Then the developer can easily:
I don't know if putting the user agent code into Alertify itself is a good idea (sniffing the user agent is opening a can of worms), but I don't see any downsides in a simple "reverse button order" boolean (or however you'd go about it). |
I'm not opposed to the or even more specific Something along those lines. I'm opposed to adding the user agent sniffing code in alertify... |
@fabien-d i think |
Yeah, I think buttonReverse is enough. It makes it clear what it does and you're not tying the behaviour to any particular OS. |
I quickly tried it out here: https://github.com/stuartkeith/alertify.js/commit/c8bdc0f4cb1272a7e538c0975414bb0c448ccae9 |
@stuartkeith looks good. I left a comment on 1 line... but if you want to open a PR for it, I'll merge |
Closed with ^ pull request. Will be part of release 0.3.1. |
Standard in OSs seems to be OK on the left, Cancel on the right. alertify.js has it the other way around.
The text was updated successfully, but these errors were encountered: