Home >Web Front-end >CSS Tutorial >How to Fix jqGrid Horizontal Scrollbar Issues in Chrome?
jqGrid in Chrome: Resolving Horizontal Scrollbar Issue
jqGrid users encountering horizontal scrollbars in Chrome despite adjusting various grid attributes can often be attributed to a compatibility issue with Chrome versions 19 and above.
In version 19, Chrome uses a different calculation for its rendering engine, leading to a misalignment in the width of the last column. To resolve this problem, the isSafari variable needs to be adjusted to distinguish between Chrome versions.
Fix:
In the jqGrid code, replace the line:
isSafari = $.browser.webkit || $.browser.safari ? true : false;
with the following:
isSafari = ($.browser.webkit || $.browser.safari) && parseFloat($.browser.version) < 536.5 ? true : false;
Additional Considerations:
By implementing this fix, users can ensure that their grids render correctly in all supported web browsers, including the latest versions of Chrome.
The above is the detailed content of How to Fix jqGrid Horizontal Scrollbar Issues in Chrome?. For more information, please follow other related articles on the PHP Chinese website!