Just got bite again by the order of the modifiers,...
# compose-android
t
Just got bite again by the order of the modifiers, but this time I wonder about logic for the `clickable`part with
offset
. (On a Box)
Copy code
.clickable(enabled = false) {
		// Do nothing
	}
	.offset {
		IntOffset(0, offset.roundToPx())
	}
This will keep the clickable area at the current position without being affected by the offset. (So problematic in my case) But
Copy code
.offset {
		IntOffset(0, offset.roundToPx())
	}
	.clickable(enabled = false) {
		// Do nothing
	}
Will move the clickable with the offset. While it sound logic with the modifier order and fit my need. The doc of `offset`says:
Offset the content by offset px.
So I wonder if the clickable area is actually supposed to move too as it's doc says: `Configure component to receive clicks via input or accessibility "click" event.`So this time the whole component and not the content. Or is the offset documentation wrong and it's actually the component that moves ?
a
It's just a wording problem. A modifier always modifies the content at that position, i.e. the component itself plus all the modifiers after that modifier, no matter what the doc says.
t
So I can rely on the clickable area to move when after offset it's WAI?
a
Yep.
👍 1