htmx icon indicating copy to clipboard operation
htmx copied to clipboard

result of the closest function doesn't evaluate as null on old browsers

Open anpin opened this issue 3 years ago • 0 comments

hi, I think I found a bug in https://github.com/bigskysoftware/htmx/blob/33332b1cec59307e4924fcc1707f05bf99482078/src/htmx.js#L506 On browsers without Element.closest() it doesn't return null, so this line evaluates as false positive condition leading to improper behavior https://github.com/bigskysoftware/htmx/blob/33332b1cec59307e4924fcc1707f05bf99482078/src/htmx.js#L1257 I have fixed it by adding return null after this line https://github.com/bigskysoftware/htmx/blob/33332b1cec59307e4924fcc1707f05bf99482078/src/htmx.js#L516 Should I open a PR?

anpin avatar Sep 15 '22 08:09 anpin