-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Override native js functions window.alert and window.confirm #380
Override native js functions window.alert and window.confirm #380
Conversation
…entical behaviors)
Is there a possible title for the dialog? |
// return early | ||
return confirmed; | ||
};"); | ||
} | ||
} | ||
?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why can't we like commits facebook-style ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes, I understand now :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha @tomolimo i was scared of a tomahawklimo to be sent :p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
??? |
Here is the optional caption : window.confirm('My confirm dialog', 'My title');
window.alert('My alert dialog', 'My title'); If not present, no title title is displayed for confirm. |
Perfect! |
I'll keep this pr unmerged until Friday. Waiting for suggestions and improvments |
ok |
…rm_functions Override native js functions window.alert and window.confirm
There is a problem as confirm() is asynchronous and works with the last clicked element.... |
I don't have time to fix this now, but I can do it on Monday |
Yes. Native confirm function is synchronous and new implementation is asynchronous (no solution for that, i spent 3hours to tests various code). It absolutely can't work if you don't have a user stimuli (generally 'click'). I let you think and test a solution but i doubt it will be possible. |
I'll check that on Monday. -------- Original message -------- Yes. Native confirm function is synchronous and new implementation is asynchronous (no solution for that, i spent 3hours to tests various code). It absolutely can't work if you don't have a user stimuli (generally 'click'). I let you think and test a solution but i doubt it will be possible. — |
Questions: do we use Bootstrap? |
No |
At the end : can't changed asynch to synch :( |
(with identical behaviors)
For a prettier dialog :