Setting the email address on the personal page can save too early and a user can't delete a value
Steps to reproduce
- Click on Personal link to set/change your email
- Enter a value
- Try to edit the value - sometimes the email address gets saved too early
- Try to delete the value - I was unable to delete the address
Expected behaviour
The email address value shouldn't be saved too early and the user should be able to delete the address all together.
Actual behaviour
The email address value can be saved too early and the user is unable to delete the address all together.
Server configuration
ownCloud version:
ownCloud Enterprise Edition 7.0.2 (daily) Build:2014-08-27T03:02:53+00:00
@PVince81 can you confirm?
Saved too early is because there's a delay when you type, not too critical I think.
The second part: yes, you cannot remove the email address. There was probably a ticket before but can't find it any more, so let's keep this one.
I had the "Invalid email" issue locally aswell some days ago. I wondered what was wrong as the email in the field was valid. Removing the last character and readding it solved it. But it feels wrong.
@PVince81 would it be worth my time to add a new function that fires this on blur or enter instead of a timeout? That way input would only be saved once the user leaves the field or hits enter?
@th3fallen makes sense, yes. I don't remember why this hasn't been done on blur in the first place. Maybe because if you close the browser page without leaving the field it will not save ?
@PVince81 could we not implement some way where if the data has been changed we alert the user before closing the page with something like 'you have unsaved data if you leave now your changes will be lost'... Just a thought.
Could be, but the problem with "unsaved data" is that the user might look for a "save" button. Another idea would be to also save whenever the user leaves the page, but that might add a few more code paths.
@jancborchardt can you do this?
Just increase the timeout a bit maybe?
Note: deleting the email address works for me in 8.2.0
The delay is currently at 1 second https://github.com/owncloud/core/blob/v8.2.0/settings/js/personal.js#L26. I think it's fine the way it is (not critical)
As the deletion issue is already fixed, closing.