Skip to content

v.4.0.11 AutoResize prevents page scrolling #6481

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

Closed
classix-od opened this issue Nov 27, 2017 · 1 comment
Closed

v.4.0.11 AutoResize prevents page scrolling #6481

classix-od opened this issue Nov 27, 2017 · 1 comment

Comments

@classix-od
Copy link
Contributor

The new version (4.0.11) raised a general problem in all browsers, which had occurred only in IE before. If the grid has the property autoResize set, with some border or padding, and has neither horizontal nor vertical scrollbars, the page (the browser) is prevented from scrolling down when the mouse is on the grid.

To fix this problem we need to use gridUtil.elementHeight($elm) instead of $elm[0].clientHeight (for width calculations gridUtil.elementWidth($elm)) which respects borders and padding. This would fix the problem for Chrome, Firefox and Edge. For IE we need either to use the JQuery functions outerHeight and outerWidth (which are not allowed in ui-grid according to the JQuery-freeness) or we need to augment the function elementWidth and elementHeight to respect the special case of IE.

I use the JQuery functions as a solution.

One another question:
Isn't it better for the performance to use a timeout of 250 ms for autoResize than using a watcher? A watcher would be triggered more often than a timeout function and every time the width and height need to be calculated and compared, which is not quite lite for browsers like IE.

@classix-od classix-od changed the title v.4.0.11 AutoResize prevent page scrolling v.4.0.11 AutoResize prevents page scrolling Nov 27, 2017
@mportuga
Copy link
Member

#6490

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

2 participants