RTO_DOM_focus.js
Helper file documentation for
RTO_DOM_focus.js.Docs updated: 2026-03-24
Summary
Focus a selector inside a controlled tab.
- Exports:
RTOFocusElement - Depends on:
RTO_form_api.js - Auto-binds: buttons with
data-rto-focus - Uses data attributes:
data-rto-focus,data-rto-tabKey(recommended),data-rto-tabkey(legacy),data-rto-key(legacy)
What it is
Quick helper to focus an element inside a controlled tab (by selector).
Download
Download RTO_DOM_focus.jsExample
<button data-rto-tabKey="app" data-rto-focus="#email">Focus email field</button>
<script src="../RTO_helpers/RTO_form_api.js"></script>
<script src="../RTO_helpers/RTO_DOM_focus.js"></script>
Data attributes
data-rto-focus: selector in the remote tab (example:#email)data-rto-tabKey: tabKey (recommended)data-rto-tabkey: legacy alias (accepted)data-rto-key: legacy alias (accepted)