Prtksxna has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311953

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

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

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

By making the height 100% and setting position to relative 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, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/53/311953/1

diff --git a/src/styles/Window.less b/src/styles/Window.less
index e027abc..a95ae6a 100644
--- a/src/styles/Window.less
+++ b/src/styles/Window.less
@@ -5,6 +5,12 @@
                .oo-ui-box-sizing( border-box );
        }
 
+       // This lets the -content element take focus when a child element is 
clicked
+       &-content {
+               position: relative;
+               height: 100%;
+       }
+
        // Content div takes focus when opened, so hide outline
        &-content:focus {
                outline: 0;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2806431123ee94b6f8d5f53d6b5afd16aa5c30f9
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Prtksxna <psax...@wikimedia.org>

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

Reply via email to