Symptom
Using :fn/enabled in a query doesn't correctly return enabled and disabled elements.
Expected behavior
Should act as the opposite of :fn/disabled.
Diagnosis
The code creates an XPath expression of [@enabled=true()] or [@enabled=false()]. Neither of these is effective because the DOM only includes an attribute named disabled; it does not have an attribute named enabled. Thus, we have to search for disabled with the opposite boolean flag (e.g., [@enabled=true()] must be turned into [@disabled=false()]).
Version 1.1.41
Platform All
Symptom Using
:fn/enabled
in aquery
doesn't correctly return enabled and disabled elements.Expected behavior Should act as the opposite of
:fn/disabled
.Diagnosis The code creates an XPath expression of
[@enabled=true()]
or[@enabled=false()]
. Neither of these is effective because the DOM only includes an attribute nameddisabled
; it does not have an attribute namedenabled
. Thus, we have to search fordisabled
with the opposite boolean flag (e.g.,[@enabled=true()]
must be turned into[@disabled=false()]
).Action I'll submit a PR.