Keeweb: Potential data loss: in-focus fields do not save during quit on OS X

Created on 22 Jun 2016  路  3Comments  路  Source: keeweb/keeweb

When saving/quitting with a modified field still in-focus, the changes are not reflected when you re-open the database.

I almost lost some FileVault encryption keys because of this: thank god for my clipboard manager...


Steps to Reproduce:

  1. Open a database file
  2. Click into any text field (I used URL and Notes when testing this)
  3. Type some text
  4. _Without clicking out or tabbing out of the field_ (eg, without losing Javascript focus), type 鈱楽 to save the database
  5. Also without leaving the field, quit the app with 鈱楺
  6. Re-open the database to see if your data is there...

Expected results:

  • The text you entered should have been saved in the field

Actual results:

  • The text is _not_ in the field..

I also have auto-save enabled, and would argue that KeeWeb should _also_ save the field contents if you just go right to 鈱楺 without unfocusing, and don't even press 鈱楽.

This is probably just an issue of not forcing a focusout or blur when the app is quit.


App details:

KeeWeb v1.1.4 (08087c3, 2016-04-21)
Environment: electron v0.37.4
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) KeeWeb/1.1.4 Chrome/49.0.2623.75 Electron/0.37.4 Safari/537.36

OS X version: 10.11.4

My app-settings.json:

$ cat ~/Library/Application\ Support/KeeWeb/app-settings.json | python -m json.tool                                                            
{
    "autoSave": true,
    "autoUpdate": "install",
    "clipboardSeconds": 0,
    "colorfulIcons": false,
    "demoOpened": false,
    "dropbox": false,
    "expandGroups": true,
    "gdrive": false,
    "helpTipCopyShown": true,
    "hideEmptyFields": false,
    "idleMinutes": 15,
    "listViewWidth": null,
    "lockOnCopy": false,
    "lockOnMinimize": true,
    "menuViewWidth": null,
    "minimizeOnClose": false,
    "onedrive": false,
    "rememberKeyFiles": false,
    "skipHttpsWarning": false,
    "skipOpenLocalWarn": false,
    "tableView": false,
    "tagsViewHeight": null,
    "theme": "fb",
    "webdav": false
}

Happens on a new test database, but not applicable to test on a Demo database, since I can't get that to save on an actual filesystem...

Can't show devtools either, because I'm quitting the app, and wouldn't be able to see its output :)

bug

All 3 comments

I just looked into this, and it seems to happen when the input field is still active (eg. ENTER hasn't been hit or the input still have focus) so endEdit is never called when the application is exited.

To reproduce without exiting, you can open webdev tool and hit CMD+R (or CTLR+R) to force a refresh while the input field is still active.

I don't need a reproduction for this, the case is very clear. You can see a special label 'need-info' where the issue needs more details.

Deployed to beta.keeweb.info, will be available in the next release

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matteoipri picture matteoipri  路  4Comments

PercussiveRepair picture PercussiveRepair  路  4Comments

denisgarci picture denisgarci  路  4Comments

antelle picture antelle  路  3Comments

justinkelly picture justinkelly  路  4Comments