To debug this sort of thing, I would check the value of the relevant parts - eg browser1.device.width
in this case. You could simply put it on the page and then you would see it doesn’t change - even if you change the width of the browser viewport. You wouldn’t really expect the device width to change.
I think you’re looking for browser1.viewport.width
.
This page includes an example of the browser component features.