<html> stacks problem / bug

I recently stumbled on this weird issue which took me some time to figure what’s causing it.

Just in case you are one of those who use the “autofocus” feature in your forms, when editing a stacks containing your form with autofocus turned on in one of the input elements (see e.g. below)

<input type=“text” name=“form_name” placeholder=“Name” autofocus >

you may experience the issue of typing only one text at a time which is annoying because it looked like your stack is broken. Try removing the “autofocus” text from the input element where it is assigned and it fixes the problem. Once you’re done editing your stack, just pop in the autofocus text back to the input element and you’re good to go.

This is a bug which I hope will be fixed by the folks handling the stacks library. Cheers!

A side-note: If you actually used the text as displayed above, it wouldn’t work at all as it has curly quotes.

1 Like

That is correct. I did not notice that the double quotes I typed were auto converted into curly quotes, my apologies. Finally figured out how to type the html codes to display properly. Thanks for the correction.

<input type="text" name="form_name" placeholder="Name" autofocus >

1 Like

I was able to recreate the problem. I opened up an issue on the stacks GitLad log (#486).

1 Like

Thanks Doug, really appreciate it.

1 Like

You should email the stacks dev and ask him to remove the autofocus feature in edit mode. This is the best way around it. I forget the reason but I went through this with @Isaiah before and it was difficult for stacks to remove autofocus. The simplest solution was to use other APIs that allow me as the stack dev to remove it from the code while in edit mode.

Thanks for the reminder though. I need to make sure that I took care of this in the Foundation 6 forms.

1 Like

And indeed I had forgotten! The fix will be in F6.1

Thanks for the info Joe. Appreciate it!

I think the best way around it is to disable rendering on the HTML stack when you do things that will interact with Edit mode. You really only want to see that behavior in Preview mode – it’s not doing you any good to render that in Edit mode.

Just uncheck the checkbox. :smiley:



This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.