Skip to content

Commit

Permalink
ZK-4964 and ZK-5825: Clicking bandbox and combobox button on Android …
Browse files Browse the repository at this point in the history
…does not focus input
  • Loading branch information
rebecca0201 authored and jumperchen committed Nov 5, 2024
1 parent 3c9523b commit 821f40a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions zkdoc/release-note
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ ZK 10.1.0
ZK-5777: sendRedirect() doesn't work because of the encoded &
ZK-4785: z-errorbox doesn't show in Safari
ZK-4962: ZK-3975 regression in mobile
ZK-4964: combobox input should be focused while clicking the drop-down button in Android
ZK-5825: Clicking bandbox button on Android does not focus input

* Upgrade Notes
+ Remove Htmls.encodeJavaScript(), Strings.encodeJavaScript(), Strings.escape() with Strings.ESCAPE_JAVASCRIPT, and replace them with OWASP Java Encoder APIs instead.
Expand Down
4 changes: 2 additions & 2 deletions zul/src/main/resources/web/js/zul/db/Datebox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ export class Datebox extends zul.inp.FormatWidget<DateImpl> {
var btn = this.$n('btn');

if (btn) {
this.domListen_(btn, zk.android ? 'onTouchstart' : 'onClick', '_doBtnClick');
this.domListen_(btn, 'onClick', '_doBtnClick');
if (this._inplace) this.domListen_(btn, 'onMouseDown', '_doBtnMouseDown');
}

Expand All @@ -827,7 +827,7 @@ export class Datebox extends zul.inp.FormatWidget<DateImpl> {

var btn = this.$n('btn');
if (btn) {
this.domUnlisten_(btn, zk.android ? 'onTouchstart' : 'onClick', '_doBtnClick');
this.domUnlisten_(btn, 'onClick', '_doBtnClick');
if (this._inplace) this.domUnlisten_(btn, 'onMouseDown', '_doBtnMouseDown');
}

Expand Down
4 changes: 2 additions & 2 deletions zul/src/main/resources/web/js/zul/inp/ComboWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ export class ComboWidget extends zul.inp.InputWidget<string> {
var btn: HTMLElement | undefined;

if (btn = this.$n('btn')) {
this.domListen_(btn, zk.android ? 'onTouchstart' : 'onClick', '_doBtnClick');
this.domListen_(btn, 'onClick', '_doBtnClick');
if (this._inplace) this.domListen_(btn, 'onMouseDown', '_doBtnMouseDown');
}

Expand All @@ -710,7 +710,7 @@ export class ComboWidget extends zul.inp.InputWidget<string> {

var btn = this.$n('btn');
if (btn) {
this.domUnlisten_(btn, zk.android ? 'onTouchstart' : 'onClick', '_doBtnClick');
this.domUnlisten_(btn, 'onClick', '_doBtnClick');
if (this._inplace) this.domUnlisten_(btn, 'onMouseDown', '_doBtnMouseDown');
}

Expand Down

0 comments on commit 821f40a

Please sign in to comment.