Correct name of forceFocus data attribute

Data attributes need to be '-' separated strings
in the HTML to appear as camelCase keys in the
`.dataset` (`.data()` in jQuery) property.

This corrects the assumption that the camelCasing
would carry through from the HTML.

More info:

https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes
This commit is contained in:
Tom Byers
2019-04-03 14:23:07 +01:00
parent cb55fbb344
commit cf07579a6b

View File

@@ -17,7 +17,7 @@
{% call form_wrapper(
class='js-stick-at-top-when-scrolling send-one-off-form' if template.template_type != 'sms' else 'send-one-off-form',
module="autofocus",
data_kwargs={'forceFocus': True}
data_kwargs={'force-focus': True}
) %}
<div class="grid-row">
<div class="column-two-thirds {% if form.placeholder_value.label.text == 'phone number' %}extra-tracking{% endif %}">