From b3ef24e21d83fb7723280c1f9ad5d92bb695e52c Mon Sep 17 00:00:00 2001 From: Kasper Nilsson Date: Fri, 28 Oct 2016 10:26:40 -0700 Subject: [PATCH] Employ flexbox for auto-resizing of textareas This change sets 'display: flex' and 'flex-direction: column' on the main child of gr-overlay to allow for scrolling and auto resizing of textareas when necessary, i.e. small viewports. Bug: Issue 4833 Change-Id: I5a073822691bd766336da1058658e3bbb5f108f5 --- .../gr-confirm-abandon-dialog.html | 5 ++++ .../gr-confirm-cherrypick-dialog.html | 7 +++++ .../gr-confirm-dialog/gr-confirm-dialog.html | 29 +++++++++++++++---- 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog.html b/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog.html index 7366d7448d..ea65c010b6 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog.html +++ b/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog.html @@ -28,6 +28,11 @@ limitations under the License. opacity: .5; pointer-events: none; } + .main { + display: flex; + flex-direction: column; + width: 100%; + } label { cursor: pointer; display: block; diff --git a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.html b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.html index b21575bb5c..ae738e5979 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.html +++ b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.html @@ -35,6 +35,11 @@ limitations under the License. iron-autogrow-textarea { padding: 0; } + .main { + display: flex; + flex-direction: column; + width: 100%; + } .main label, .main input[type="text"] { display: block; @@ -66,6 +71,8 @@ limitations under the License. diff --git a/polygerrit-ui/app/elements/shared/gr-confirm-dialog/gr-confirm-dialog.html b/polygerrit-ui/app/elements/shared/gr-confirm-dialog/gr-confirm-dialog.html index d8fc1df84b..54fddf5964 100644 --- a/polygerrit-ui/app/elements/shared/gr-confirm-dialog/gr-confirm-dialog.html +++ b/polygerrit-ui/app/elements/shared/gr-confirm-dialog/gr-confirm-dialog.html @@ -22,11 +22,23 @@ limitations under the License. -
-
- +
+
+
+
+ + [[confirmLabel]] + + Cancel +
+