This was created by the Open University a couple of years ago, and is
very helpful for making dragging work reliably on a range of browsers
and with both mouse and touch-screens.
Sadly, HTML5 drag-drop is not yet ready for prime-time.
A template can include itself - e.g. by looping over the context children and rendering a tree.
Ensure this promise still resolves.
Example: admin/tool/lp/templates/competencies_tree.mustache.
For iOS we need to register non passive events not only for touchstart but also for touchmove
and touchend. Also iOS could open two move dialogue windows instead of one
The form-autocomplete module uses three Mustache templates
core/form_autocomplete_input, core/form_autocomplete_suggestions and
core/form_autocomplete_selection. However, it did not support executing
the JS that is eventually part of those templates.
It's possible for the backdrop to be created during the show, before the
modal is actually fully shown.
This check is unnecessary because the getBackdrop() function always
returns a value and will always succeed.
Custom AJAX handlers for the form autocomplete fields can now optionally
return string in their processResults() callback. If a string is
returned, it is displayed instead of the list of suggested items.
The string is displayed same way as we inform about no available
suggestions.
When using the AJAX autocomplete field, it allows JavaScript to add
custom HTML to selected options. For example, the user field from
the assign roles page includes an icon and other information by the
user's name.
Once you submit the form and the page reloads, there was no way to
provide this information back to the autocomplete field. HTML
<option> tag was used for the value names but it may only contain
text, not tags, so including it in the normal value did not work.
This change adds a new option for the autocomplete field that lets
you include HTML to override the default (text-only) value of the
label used to represent each option.