Bug #5040
closedixsl:contains() returns true for missing 'value' property
0%
Description
I made a test that handles ixsl:onclick
for an empty input (<input id="empty-value"/>
). The stylesheet is here.
Calling ixsl:contains(., 'value')
always returns true()
-- with or without entering the value. (It's being printed out to console in the test.)
I suspect this is because HTML elements (or at least inputs) contain an implicit value
property? Was trying to find a confirmation of this on MDN but couldn't so far.
In any case such behavior of ixsl:contains()
is rather counter-intuitive.
Updated by Debbie Lockett almost 3 years ago
Yes, it looks like an HTMLInputElement
always has a value
property: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement
So I'm afraid the ixsl:contains()
result is right. Can you instead just do a check whether the value is the empty string?
Updated by Martynas Jusevicius almost 3 years ago
OK I guess we can close this then :)
Updated by Debbie Lockett almost 3 years ago
- Status changed from New to Rejected
Closing this issue with no action; the ixsl:contains
function is behaving as expected.
Please register to edit this issue
Also available in: Atom PDF Tracking page