jenkins-bot has submitted this change and it was merged.

Change subject: Window: Update `-content` CSS so that child elements can give 
it focus
......................................................................


Window: Update `-content` CSS so that child elements can give it focus

Since the elements in oo-ui-window-content are absolutely positioned,
the element itself has no height. Due to this Firefox doesn't give the
parent focus when a child element is clicked.

By setting 'position' to anything other than 'static' we ensure
that the parent gets focus, and 'Esc' to close continues to work.

Bug: T137134
Change-Id: I2806431123ee94b6f8d5f53d6b5afd16aa5c30f9
---
M src/styles/Window.less
1 file changed, 12 insertions(+), 3 deletions(-)

Approvals:
  VolkerE: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/styles/Window.less b/src/styles/Window.less
index e027abc..7f1d725 100644
--- a/src/styles/Window.less
+++ b/src/styles/Window.less
@@ -5,9 +5,18 @@
                .oo-ui-box-sizing( border-box );
        }
 
-       // Content div takes focus when opened, so hide outline
-       &-content:focus {
-               outline: 0;
+       &-content {
+               // This lets the -content element take focus in Firefox when a 
child element is clicked
+               position: absolute;
+               top: 0;
+               left: 0;
+               right: 0;
+               bottom: 0;
+
+               // Element takes focus when opened, so hide outline
+               &:focus {
+                       outline: 0;
+               }
        }
 
        &-head,

-- 
To view, visit https://gerrit.wikimedia.org/r/311953
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2806431123ee94b6f8d5f53d6b5afd16aa5c30f9
Gerrit-PatchSet: 4
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Prtksxna <psax...@wikimedia.org>
Gerrit-Reviewer: Bartosz DziewoƄski <matma....@gmail.com>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Prtksxna <psax...@wikimedia.org>
Gerrit-Reviewer: VolkerE <volke...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to