I have created a custom textfield which can also show trigger icons before the input field.
However, it seems I am missing something important, because now the viewport does no longer resize when the browser window is resized.
I have made a fiddle that exhibits the problem:
You have introduced a global id
property in your applyIcons
function. It's likely clobbering some local variable elsewhere.