Hey guys,
Looks like the Popup class is having issues to show in Safari on the iPhone.
In the EventEditor I created a button that, when clicked, should create and show a Popup with a simple form.
In the desktop it works for both Chrome and Safari. However when I open it in Safari on the iPhone and click on the button, the popup is not shown, and the EventEditor window is automatically closed.
Here is my code to create the button and the popup:
const button = new Button({
appendTo: patientsList,
cls: 'new-button',
onClick: function (e) {
console.log('new-button onClick => e', e)
const popup = new Popup({
appendTo: document.querySelector('.eventEditor'),
header: LocaleManager.locale.EventEdit['New Popup'],
floating: true,
centered: true,
positioned: true,
closeAction: 'hide',
width: '20em',
minHeight: '18em',
bbar: [
{
text: 'Cancel',
minWidth: 100,
onAction: 'up.close'
},
{
text: 'Add',
cls: 'b-raised b-blue submit-button',
minWidth: 100,
onAction: (event) => {
console.log('add button event', event)
popup.hide()
}
}
],
items: [
{
ref: 'nameField',
type: 'text',
required: true,
label: LocaleManager.locale.EventEdit.Name
},
{
ref: 'phoneNumberField',
type: 'text',
cls: 'phone-number-field',
label: LocaleManager.locale.EventEdit['Phone Number']
}
]
})
popup.show()
}
})
button.show()
This new button shows, but when I click it, the popup doesn't show. None of the console.log's is printed in the web inspector for the iPhone. And the EventEditor modal is automatically closed.
Do you know what can be causing it?
Any help would be really appreciated.
Thanks and best,
Gustavo