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

modalDialog: Make sure we can use the on screen keyboard #12584

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
12 changes: 11 additions & 1 deletion js/ui/modalDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ var ModalDialog = GObject.registerClass({
this._cinnamonReactive = params.cinnamonReactive;
this._destroyOnClose = params.destroyOnClose;

// We track this to make sure we can access the on screen keyboard
// when hiding and showing modal dialogs
this._onScreenKeyboard = Main.layoutManager.keyboardBox;

Main.uiGroup.add_actor(this);

let constraint = new Clutter.BindConstraint({
Expand All @@ -98,7 +102,7 @@ var ModalDialog = GObject.registerClass({
x_fill: true,
y_fill: true
});
this._monitorConstraint = new Layout.MonitorConstraint();
this._monitorConstraint = new Layout.MonitorConstraint({ work_area: true });
this._backgroundBin.add_constraint(this._monitorConstraint);
this.add_actor(this._backgroundBin);

Expand Down Expand Up @@ -238,6 +242,9 @@ var ModalDialog = GObject.registerClass({
if (!this.pushModal(timestamp))
return false;

if (this._onScreenKeyboard.visible)
Main.uiGroup.set_child_above_sibling(this._onScreenKeyboard, null);

this._fadeOpen();
return true;
}
Expand All @@ -257,6 +264,9 @@ var ModalDialog = GObject.registerClass({
this.popModal(timestamp);
this._savedKeyFocus = null;

if (this._onScreenKeyboard.visible)
Main.panelManager.lowerActorBelowPanels(this._onScreenKeyboard);

this.ease({
opacity: 0,
duration: this.openAndCloseTime,
Expand Down
Loading