Retrospring/app/javascript/retrospring/controllers/questionbox_focus_controlle...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
363 B
TypeScript
Raw Normal View History

import { Controller } from '@hotwired/stimulus';
import { Modal } from 'bootstrap';
export default class extends Controller {
click(): void {
const modal = Modal.getInstance(this.element.closest('.modal'));
const questionbox = document.querySelector((this.element as HTMLAnchorElement).href);
modal.hide();
questionbox.scrollIntoView();
}
}