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

ZK-4961: Unable to scroll in grid and listbox when using non-native s… #3235

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions zkdoc/release-note
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ ZK 10.1.0
ZK-5825: Clicking bandbox button on Android does not focus input
ZK-5833: ZK-423 regression on Android
ZK-4960: Listbox doesn't keep scrollbar position when applying hflex="min" on a listheader in mobile
ZK-4961: Unable to scroll in grid and listbox when using non-native scrollbar on mobile

* Upgrade Notes
+ Remove Htmls.encodeJavaScript(), Strings.encodeJavaScript(), Strings.escape() with Strings.ESCAPE_JAVASCRIPT, and replace them with OWASP Java Encoder APIs instead.
Expand Down
5 changes: 1 addition & 4 deletions zul/src/main/resources/web/js/zul/grid/Grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,8 @@ export class Grid extends zul.mesh.MeshWidget {
override onSize(): void {
super.onSize();
var canInitScrollbar = this.desktop && !this._nativebar;
// refix ZK-2840: only init scrollbar when height or vflex is set in mobile
if (!this._scrollbar && canInitScrollbar) {
if (!zk.mobile || (zk.mobile && (this.getHeight() || this.getVflex()))) {
this._scrollbar = zul.mesh.Scrollbar.init(this); // 1823278: should show scroll bar here
}
this._scrollbar = zul.mesh.Scrollbar.init(this); // 1823278: should show scroll bar here
}
setTimeout(() => {
if (canInitScrollbar) {
Expand Down
5 changes: 1 addition & 4 deletions zul/src/main/resources/web/js/zul/sel/Listbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,8 @@ export class Listbox extends zul.sel.SelectWidget {
override onSize(): void {
super.onSize();
var canInitScrollbar = this.desktop && !this.inSelectMold() && !this._nativebar;
// refix ZK-2840: only init scrollbar when height or vflex is set in mobile
if (!this._scrollbar && canInitScrollbar) {
if (!zk.mobile || (zk.mobile && (this.getHeight() || this.getVflex()))) {
this._scrollbar = zul.mesh.Scrollbar.init(this); // 1823278: should show scrollbar here
}
this._scrollbar = zul.mesh.Scrollbar.init(this); // 1823278: should show scrollbar here
}
setTimeout(() => {
if (this.desktop) {
Expand Down
Loading