Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Auto-Drafts VS. Usability

mtschirsmtschirs ✭✭✭
edited August 2015 in Vanilla 2.0 - 2.8

After playing around with Vanilla for some time, I am really annoyed by the draft auto-saves.

If I write a comment and accidentally navigate back or to another site and then come back to the comment form, modern browsers would automatically fill in my latest unfinished comment.

With Vanilla auto-saved drafts however, the form is filled with an older version of what I wrote (from the time of the last auto-save). The browser doesn't automatically fill in my latest version of my unfinished comment since the form already has a value :( .

How to combine these two mechanisms without overriding this very useful client-side 'auto-saving'?

Tagged:
vrijvlinderperegrine

Comments

  • R_JR_J Ex-Fanboy Munich Admin

    I don't know if that plugin works with the current version of Vanilla, but I guess HTML5s local storage is one answer: http://vanillaforums.org/addon/localdrafts-plugin

    You will loose drafts when changing the client, but to my opinion the advantages are worth it.

    mtschirsBleistivtperegrine
  • mtschirsmtschirs ✭✭✭

    Didn't know about that plugin yet! Thanks.

    However, shouldn't this be adressed in Vanilla itself? The auto-draft feature might have made sense some years ago, but with modern browsers it could really need an update.

    peregrine
  • LincLinc Detroit Admin

    There's a plugin specifically for disabling that feature, almost as old as the product: http://vanillaforums.org/addon/stopautodraft-plugin

    I do not trust any browser to remember my comment, frankly. Still a fan of auto-save.

  • mtschirsmtschirs ✭✭✭

    I don't want to ditch auto-drafts, just don't want them to ruin the even better auto-save mechanism provided by modern browsers. Surely, we can combine the best of both worlds?

    peregrine
  • LincLinc Detroit Admin

    @mtschirs said:
    Surely, we can combine the best of both worlds?

    By making drafts device-dependent?

  • mtschirsmtschirs ✭✭✭
    edited August 2015

    @Linc schrieb:
    By making drafts device-dependent?

    What would that solve? A solution might be to ask the client directly whether or not he has a recent auto-save of the form value. This is IMHO only possible via javascript. Only if the client browser does not have an auto-save available, we request the last available draft from the server and only then set the form input value.

    See https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion (we don't want to turn it off though, only detect if it is available)

    vrijvlinderperegrine
  • LincLinc Detroit Admin

    @mtschirs said:
    What would that solve?

    I wasn't making a proposal, I was trying to understand what was already being proposed.

  • mtschirsmtschirs ✭✭✭

    Just fixed this via https://github.com/vanilla/vanilla/pull/2948

    The issue was not the auto-draft feature (as I thought), but a misguided "Cache-Control: no-store" header. See the linked pull request.

    Bleistivtvrijvlinderperegrine
Sign In or Register to comment.