Skip to content

Commit

Permalink
Placeholder should be active label and not overlap
Browse files Browse the repository at this point in the history
  • Loading branch information
mattselle committed Dec 10, 2019
1 parent 2b2aa69 commit 938fd37
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/UniversalDashboard.Materialize/Tests/textbox.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,13 @@ Describe "Textbox" {
Find-SeElement -ClassName 'active' -Driver $Driver | should be $true
}
}

Context "textbox placeholder" {
Set-TestDashboard -Content {
New-UDTextbox -Id 'EndTimestamp' -Label 'EndTimestamp' -Placeholder (Get-Date).ToString('yyyy.MM.dd HH:mm:ss.fff')
}
It "should be active" {
Find-SeElement -ClassName 'active' -Driver $Driver | should be $true
}
}
}
2 changes: 1 addition & 1 deletion src/UniversalDashboard/Controls/src/textbox.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function New-UDTextbox {
}

$LabelClassName = ""
if($Value){
if($Value -Or $Placeholder){
$LabelClassName = "active"
}

Expand Down

0 comments on commit 938fd37

Please sign in to comment.