hasadna / hasadna/accessible-graphs
TypeError: `$(...).modal` is not a function
- Dominant language
- JavaScript
- Stars
- 18
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
I've been doing some tests and bug hunting on [GitHub Pages](https://s0ands0.github.io/sensory-interface/), and found that clicking the Language `a` tag within `wonder-nav-ul` unordered list causes the following JavaScript console error to be logged...
```
TypeError: $(...).modal is not a function
```
... I've tracked this down to to [`ts/js/scripts.ts` line `83`](https://github.com/hasadna/sensory-interface/blob/7db9a6a555703300e7e2028c26f7252481d66a5b/ts/js/scripts.ts#L83)...
```TypeScript
// open language pop-up
$('.language-click').click(() => {
// @ts-ignore: Property 'modal' does not exist on type 'JQuery'
$('#language-popup').modal('toggle');
});
```
... and it seems as though TypeScript errors/warnings where legit; there is no `modal` on the element/object that JQuery returns.
I'm willing to remove this dependency on JQuery and submit a Pull Request if anyone on the team is able to let me know that the intended behavior of this call is.
Contributor guide
Research direction
Reproduce the error on the linked GitHub Pages site by clicking the Language link in wonder-nav-ul, then inspect ts/js/scripts.ts line 83 and the #language-popup handler. Confirm the intended popup behavior with the maintainers; done means the language popup works without the $(...).modal TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jquery, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100