Commit 752f9da
committed
Merge branch 'bugfix/Placeholder-Value' into develop
For some reason, the current value was being used as the inherited value, which is displayed as the placeholder. Looking at the commit history (4af6d9b), this appears to have just been a shortcut since the the placeholder doesn't get displayed if there's an existing value. But in addition to being conceptually confusing, it also relays that confusion to the end user when they attempt to delete an existing value, as it will appear to reset to the original value. I suspect that was a condition I didn't foresee when making that change. This issue is compounded by the fact that the style for the placeholder is virtually identical to the style for the actual text, and so it's not clear that it's a placeholder value.
The first issue was resolved by pulling the inherited value from the `DerivedTopic`—a refinement, in fact, that I had considered in 4af6d9b, but didn't think it provided enough benefit at the time: "This could be made a bit more explicit by caling `GetValue()` off of the `DerivedTopic`, but that complicates the logic and has no impact on the front end." Hindsight!
The second issue is resolved by adjusting the `::placeholder` pseudoclass. I ran into some peculiar issues with this which are worth noting. First, I had to use `!important` on the `color`, as it was otherwise being overwritten by an unknown source. (For some reason, Chrome's debugger tools don't include the `::placeholder` pseudoclass, even though they list other pseudoclasses, so it's difficult to trace this back.) Further, while there's an expected `-ms-input-` vendor prefix that should be required for (older versions of) Edge, implementing it causes the entire selector to be entirely ignored. As such, it's been removed, so this may still appear in darker text on older versions of Chrome.3 files changed
Lines changed: 16 additions & 10 deletions
File tree
- OnTopic.Editor.AspNetCore
- Controllers
- OnTopic.Editor.Models
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
180 | 183 | | |
181 | 184 | | |
182 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
163 | 162 | | |
164 | | - | |
| 163 | + | |
165 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
166 | 173 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | 77 | | |
82 | 78 | | |
83 | 79 | | |
| |||
0 commit comments