As designed Toggling the thread list container triggers Quick Thread form

Nulumia

Well-known member
Affected version
2.1.6
Found an odd quirk where toggling any parent container directly above the thread list on forum_view, activates the Quick Thread form.

thread-list-toggle.webp

You can replicate by placing this anywhere - I dropped it into PAGE_CONTAINER below <!--XF:EXTRA_OUTPUT--> just to be sure:
Code:
<span class="toggleTrigger" data-xf-click="toggle" title="Toggle the discussion list" data-target=".block-body > .structItemContainer">Toggle Me</span>

Then enter any forum node and the toggle will active the Quick Thread.
 
Strictly speaking, this is as designed. By default, toggling an area will try to focus within it. We will prioritize focusing form inputs and the first input here is the quick thread system, which then triggers that to be expanded.

You can disable autofocus on a particular form by applying data-no-auto-focus="true" to the form tag.
 
Thanks for that info @Mike, I'll get around this then by adding that attribute to the form conditionally if the toggler is used on the page (y)
 
Top Bottom