> ## Documentation Index > Fetch the complete documentation index at: https://www.canva.dev/docs/print-partnerships/llms.txt > Use this file to discover all available pages before exploring further. # onBackClick Registers a callback that runs when a user clicks the Back button in the editor's header. **Tip:** This function does *not* run when then the user uses the native "back" feature in their browser. **Tip:** If you don't register the `onBackClick` callback, the "Back" button still appears in the Canva editor, but nothing happens when the user clicks it. ## Usage ```javascript (async () => { const api = await Canva.Partnership.initialize({ apiKey: "", autoAuthToken: "", container: document.getElementById("container"), }); const onBackClick = () => { // the user has clicked the "Back" button in the editor's header console.log("You clicked the 'Back' button!"); }; const onProductSelect = (opts) => { api.createDesign({ ...opts, onBackClick, }); }; api.showCatalog({ onProductSelect, }); })(); ```