Quantcast

No autosave when focus stays in the one text field

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

No autosave when focus stays in the one text field

bwallis42
Autosave doesn't seem to happen if the user keeps typing in a single text box.

For our customers this could be a problem as they may spend many minutes (10's of minutes) entering text into a large text or rich text area and they don't get any autosaving of that text.

Is this expected behaviour or is it something to do with my configuration? I'm running version 2016.3 and my autosave configuration is
    <property as="xs:boolean" name="oxf.fr.persistence.cpf.autosave" value="true" />
    <property as="xs:integer" name="oxf.fr.detail.autosave-delay.CPF.*" value="4000" />
which should do a save every 4 seconds while changes are being made.

I get the autosaves if I move between fields or out of the browser window and back in but not if I just keep typing into the text or rich text field.

thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No autosave when focus stays in the one text field

bwallis42
A little more info.

The rich text field does do the autosave after you type enter for a new line, then an autosave happens after the configured period (4 seconds in my case).

The text field does not. You can type for a long time with newlines as well and there are no autosaves performed.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No autosave when focus stays in the one text field

Alessandro  Vernet
Administrator
Hi Brian,

I suspect this is happening specifically with the Formatted Text Area, because it uses the TinyMCE, on which we register a `onchange` handler, and TinyMCE only calls the handler when you press enter, but not when you add characters to the current line. The solution here would be to use some other JavaScript handler, so we can know when the value changed. Conversely, if/when doing this, we'll need to make sure that we don't send the value to the server every time that event fires, as we don't want that control to be "incremental" by default.

https://github.com/orbeon/orbeon-forms/issues/3179

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Loading...