jcf icon indicating copy to clipboard operation
jcf copied to clipboard

Ajax loading

Open yudiznilay opened this issue 3 years ago • 3 comments

Scenario In a page there is select defined with this code

<select>
   <option hidden selected>Choose Option</option>
</select>
<a href="redirect.php">Go to this page</a>
var customSelect = $('select');
// Options for custom Select
jcf.setOptions('Select', {
    wrapNative: false,
    wrapNativeOnMobile: false,
    fakeDropInBody: true
});
jcf.replace(customSelect);
jcf.refresh();

Other options are loaded via ajax. Next to select there is link which redirects to new page

Issue After selecting a value loaded via ajax and click on the link the page redirects and coming back from that page via browser back button, select doesn't show Choose Option value in the dropdown. Only the JCF tags are generated.

yudiznilay avatar Mar 10 '21 09:03 yudiznilay

Does your code work without jcf? I mean, does native select works fine on back button?

yazonnile avatar Mar 10 '21 10:03 yazonnile

Yes

yudiznilay avatar Mar 10 '21 11:03 yudiznilay

Try to refresh jcf then. Its hard to fix the issue without seeing this issue in the browser.

yazonnile avatar Mar 10 '21 12:03 yazonnile