bigskysoftware / bigskysoftware/htmx
`setAttribute('hx-ignore')` does not disable htmx in 4.0
- Dominant language
- JavaScript
- Stars
- 49.4k
- Forks
- 1.7k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 30
Description
Was working with `setAttribute('hx-disable')`, 4.0 upgrade documents claim that this attribute was only "renamed" but there seems to be a behavior change: https://four.htmx.org/docs/whats-new-in-htmx-4
Showcase:
```html
Test
htmx.config.logAll = true;
Ignore next button
Click me
```
Expected: Clicking "Click me" should not make a request after clicking "Ignore next button".
Actual: It makes a request.
Workaround:
Use `htmx.process(element, true)` after setting `hx-ignore`.
```html
Ignore next button
Click me
```
Contributor guide
Research direction
Start by reproducing the HTML showcase with htmx.config.logAll enabled, then inspect the handling behind htmx.process(element, true) and dynamic hx-ignore changes. Done means setting hx-ignore alone prevents the second button from making a request, without requiring the documented workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100