You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
classix-od
changed the title
v.4.0.11 AutoResize prevent page scrolling
v.4.0.11 AutoResize prevents page scrolling
Nov 27, 2017
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.
The text was updated successfully, but these errors were encountered: