Memos - Last character of memo text is gone after restarting app (Bug #479)


Added by Herman van Hazendonk almost 4 years ago. Updated over 3 years ago.


Status:Closed Start date:01/28/2014
Priority:High Due date:
Assignee:Roshan Gunasekara % Done:

0%

Category:- Spent time: -
Target version:LuneOS - Later

Description

After saving a memo, closing app and reopening the app and memo. The last character entered in the memo text is gone.

When closing the memo and reopening the memo (without closing the app) the last character is still there. So it seems to have something to do with the closing and reopening of the app and loading the memo.


History

Updated by Herman van Hazendonk almost 4 years ago

Seems that oninput could be the issue. As per https://github.com/enyojs/enyo/wiki/Text-Fields

"You can listen for the oninput and onchange DOM events to know when the text inside an Input has been modified. oninput fires immediately, while onchange fires when the text has changed and the input loses focus."

While doing some debugging it seems that oninput takes the input from "before" it was modified instead from "after" it was modified. This causes the last character to drop off.

Changing it to "onchange" sorts it partially, but seems like it causes other issues, because the input needs to "lose focus" before it's triggered. So when you create a new memo and close the app it doesn't get saved.

Updated by Herman van Hazendonk almost 4 years ago

Seems like we might need enyo.job as per example at:

https://bitbucket.org/GlitchTechScience/gts-plugins/src/10ed2dded0dd/AutoComplete/AutoComplete.js?at=master

inputChanged and fireInputChanged look like what we might be after?

Updated by Herman van Hazendonk almost 4 years ago

The bug is actually for the "last entered character" which doesn't necessarily equal the last character of the memo as per subject.

Updated by Roshan Gunasekara almost 4 years ago

Adding a delay to the saving routine as you suggested seems to have done the trick. PR submitted.

Updated by Roshan Gunasekara almost 4 years ago

  • Status changed from New to In Progress

Updated by Herman van Hazendonk almost 4 years ago

Tested and seems to work fine!

  • Status changed from In Progress to Resolved

Updated by Herman van Hazendonk over 3 years ago

Solved and in recent builds.

  • Target version set to Later
  • Status changed from Resolved to Closed

Also available in: Atom PDF