guillaumepotier / Garlic.js

Automatically persist your forms' text and select field values locally, until the form is submitted.

Home Page:http://garlicjs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Garlic.js does not works if an input text or select field is filled by a click function jquery

shashankkumrawat opened this issue · comments

If I fill a input field or select field using jquery click function and then do refresh the page. It lost its data.
Please check this issue.

I believe I'm running in the same issue, however it works on Firefox and it doesn't on Chrome

I'm also running in this issue too. When a text field is setting value by date picker, refresh the page in Chrome, then the date value lost. The root cause is when setting a text field programmingly, this events do not fire [ 'DOMAttrModified', 'textInput', 'input', 'change', 'click', 'keypress', 'paste', 'focus' ]

this can solve by manually trigger the events above, like $('txtDate').trigger('change')

Thank you felixln!