emoncms / MyHomeEnergyPlanner

My Home Energy Planner - Open Source home energy assessment software based on emoncms framework + openbem
GNU Affero General Public License v3.0
23 stars 27 forks source link

Text disappears from commentary box on householder questionnaire #311

Closed ghost closed 6 years ago

ghost commented 7 years ago

When typing into commentary box on householder questionnaire, if you move away from the page and come back, or refresh the page, the text disappears.

cagabi commented 7 years ago

Interesting enough this is something that has always happened. The problem was that the data only gets saved when you move away from one input (for example to another input) or when more than 5 seconds pass. So if you typed something and go to another page before those 5 secs, you loose it.

I have half fixed this for the commentary: every 15 characters we save the data. I have done it this way because if we save it for every character changed then the program slows down. With this solution we may still loose the last 15 characters if you refresh the page too quickly but I couldn't think in a better compromise.

I'll keep this issue open just in case I think of a better solution.

ghost commented 6 years ago

Closing #247 as this is the same issue.

cagabi commented 6 years ago

I am closing this now as the problem seems to be sorted