Skip to content

Commit c98f5e0

Browse files
asynclizcopybara-github
authored andcommitted
fix(textfield): outlined label jumping horizontally with leading icon
PiperOrigin-RevId: 513028108
1 parent fd605d5 commit c98f5e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

field/lib/field.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ export class Field extends LitElement {
195195
// scale and compensate for tracking and overflow.
196196
// (use scrollWidth instead of width to account for clipped labels)
197197
const scale = restingScrollWidth / floatingScrollWidth;
198-
const xDelta = floatingX - restingX;
198+
const xDelta = restingX - floatingX;
199199
// The line-height of the resting and floating label are different. When
200200
// we move the floating label down to the resting label's position, it won't
201201
// exactly match because of this. We need to adjust by half of what the

0 commit comments

Comments
 (0)