Skip to content

Commit

Permalink
Fix Placeholder overlap issue (#1359)
Browse files Browse the repository at this point in the history
* Fix label overlap issue when value is provided

#1330

* Placeholder should be active label and not overlap

#921

* Revert "Placeholder should be active label and not overlap"

This reverts commit 938fd37.
  • Loading branch information
mattselle authored and adamdriscoll committed Dec 10, 2019
1 parent 3fca224 commit 29eee66
Show file tree
Hide file tree
Showing 2 changed files with 12 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
}
}
}
4 changes: 3 additions & 1 deletion src/UniversalDashboard/Controls/src/textbox.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ function New-UDTextbox {
}

$LabelClassName = ""
if($Value){

if($Value -Or $Placeholder){

$LabelClassName = "active"
}

Expand Down

0 comments on commit 29eee66

Please sign in to comment.