Skip to content

Commit

Permalink
ZK-4961: Unable to scroll in grid and listbox when using non-native s…
Browse files Browse the repository at this point in the history
…crollbar on mobile
  • Loading branch information
DevChu authored and rebecca0201 committed Nov 5, 2024
1 parent 2083ac4 commit 9f3aed1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
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

0 comments on commit 9f3aed1

Please sign in to comment.