-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
Environment
[Core]
onsenui latest
[Platform]
Desktop - Windows 10 64-bit
[Browser]
Desktop - Chrome 71.0.3578.98 on Windows 10 64-bit
Encountered problem
When using the ons.notification.prompt option submitOnEnter, if set to false, an error is produced and the callback is not launched.
How to reproduce
set submitOnEnter = false in ons.notification.prompt options
- HTML
<ons-page>
<ons-button onclick="showAlert()">Alert</ons-button>
<ons-button onclick="showConfirm()">Confirm</ons-button>
<ons-button onclick="showPrompt()">Prompt</ons-button>
<ons-button onclick="showToast()">Toast</ons-button>
</ons-page>
- JS
var showAlert = function() {
ons.notification.alert('Alert!');
};
var showConfirm = function() {
ons.notification.confirm('Confirm!')
};
var showPrompt = function() {
ons.notification.prompt('Prompt!',{
submitOnEnter : false
})
.then(function(input) {
var message = input ? 'Entered: ' + input : 'Entered nothing!';
ons.notification.alert(message);
});
};
var showToast = function() {
ons.notification.toast('Toast!', {
timeout: 2000
});
};
Metadata
Metadata
Assignees
Labels
No labels