Skip to content

Commit abee3c4

Browse files
JinsukKimChromium LUCI CQ
authored andcommitted
multi-instance: Close the dialog on touch outside
Modal dialog has a bug letting users interact with the back contents. in split-screen mode. This CL sets a new property for multi-instance dialog so that a touch outside the dialog dismisses it. It allows the UI to work like that of most of other features. The issue in the split- screen mode itself will be addressed separately. Bug: 1246958 Change-Id: I7096bf3d52695f0b58b03c715172d51c476c8aa1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3142704 Reviewed-by: Theresa <[email protected]> Commit-Queue: Theresa <[email protected]> Cr-Commit-Position: refs/heads/main@{#918844}
1 parent 0da9abe commit abee3c4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/InstanceSwitcherCoordinator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ public void onClick(PropertyModel model, int buttonType) {
159159
String title = resources.getString(R.string.instance_switcher_header);
160160
return new PropertyModel.Builder(ModalDialogProperties.ALL_KEYS)
161161
.with(ModalDialogProperties.CONTROLLER, controller)
162+
.with(ModalDialogProperties.CANCEL_ON_TOUCH_OUTSIDE, true)
162163
.with(ModalDialogProperties.CUSTOM_VIEW, dialogView)
163164
.with(ModalDialogProperties.TITLE, title)
164165
.with(ModalDialogProperties.POSITIVE_BUTTON_TEXT, resources, R.string.cancel)

chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/TargetSelectorCoordinator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ public void onClick(PropertyModel model, int buttonType) {
110110
String title = mContext.getString(R.string.menu_move_to_other_window);
111111
return new PropertyModel.Builder(ModalDialogProperties.ALL_KEYS)
112112
.with(ModalDialogProperties.CONTROLLER, controller)
113+
.with(ModalDialogProperties.CANCEL_ON_TOUCH_OUTSIDE, true)
113114
.with(ModalDialogProperties.CUSTOM_VIEW, mDialogView)
114115
.with(ModalDialogProperties.TITLE, title)
115116
.with(ModalDialogProperties.POSITIVE_BUTTON_DISABLED, true)

0 commit comments

Comments
 (0)