Project

Profile

Help

Bug #5040

closed

ixsl:contains() returns true for missing 'value' property

Added by Martynas Jusevicius almost 3 years ago. Updated almost 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
IXSL extensions
Sprint/Milestone:
-
Start date:
2021-07-15
Due date:
% Done:

0%

Estimated time:
Applies to JS Branch:
2
Fix Committed on JS Branch:
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

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.

Actions #1

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?

Actions #2

Updated by Martynas Jusevicius almost 3 years ago

OK I guess we can close this then :)

Actions #3

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