Issues/3010895: Empty state is wrong for input when filled with whitespaces.
3 unresolved threads
Closes #3010895
Merge request reports
Activity
Filter activity
added 1208 commits
-
547cf18f...2e311a8d - 1204 commits from branch
project:11.x
- d7f468a6 - Issues/3010895: Empty state is wrong for input when filled with whitespaces.
- a145eaf9 - Issues/3010895: Cspell fixes.
- 1510958d - Replaced trim with regex
- 5503478f - Unwanted changes
Toggle commit list-
547cf18f...2e311a8d - 1204 commits from branch
535 535 keyup() { 536 536 // The function associated with that trigger returns the new value for 537 537 // the state. 538 return this.val() === ''; 538 return ( 539 this.val().replace(/^[\t\n\v\f\r ]+|[\t\n\v\f\r ]+$/g, '') === '' 540 ); 539 541 }, 540 542 // Listen to 'change' for number native "spinner" widgets. 541 543 change() { 542 return this.val() === ''; 544 return ( 545 this.val().replace(/^[\t\n\v\f\r ]+|[\t\n\v\f\r ]+$/g, '') === '' changed this line in version 7 of the diff
added 1 commit
- dc442bdc - change in variable type to fix pipline issue
528 528 * @prop value 529 529 * @prop collapsed 530 530 */ 531 const blankSpaceExp = /^[\t\n\v\f\r ]+|[\t\n\v\f\r ]+$/g; As a regex this should have a comment to explain what the purpose is. And the name, 'blankSpaceExp', should be descriptive of what this does. I know what this is doing and I have yet to figure out what 'blankSpaceExp' means.
The list of characters here is different than the trim function in PHP. In #32 it was asked that these are consistent.
348 348 $this->assertEquals('required', $textfield_required_target->getAttribute('required')); 349 349 $this->assertTrue($details->hasAttribute('open')); 350 350 $this->assertTrue($textfield_in_details->isVisible()); 351 352 // Add a whitespace to the textfield and ensure that 'filled' state is 353 // not triggered. 354 $trigger->setValue(' '); This is only testing the space character so the regex is not well tested. Comment #34 suggests iterating through different strings to test the regex.
Please register or sign in to reply