Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bmiller-pm opened this issue Feb 1, 2018 · 0 comments
Open

Comments

@bmiller-pm
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant