Skip to content

If the input resizes, the clear button doesn't update position #8

@bmiller-pm

Description

@bmiller-pm

In a responsive form the controls will certainly resize. So it'd be great if the clear button moved with the control.
For a quick fix I added a call to update() but had to run it off the window.resize event.
Using a timeout made it run smooth.

	...
	triggerBtn();

	$(window).resize(()=> {
		if (this.resizeTO)
			clearTimeout(this.resizeTO);
		this.resizeTO = setTimeout(()=> {
			update();
		}, 500);
	});
});

I just appened this to the end of the jq object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions