[PATCH 1 of 2] hgweb: add z-index for search field tooltip

Anton Shestakov av6 at dwimlabs.net
Thu Jun 28 07:13:40 UTC 2018


# HG changeset patch
# User Anton Shestakov <av6 at dwimlabs.net>
# Date 1530142868 -28800
#      Thu Jun 28 07:41:08 2018 +0800
# Node ID 9ddf150b8e266c7e81e018552630994529e54d50
# Parent  b4cfd803b3f2697928be9b3a96787bcee3447c7e
hgweb: add z-index for search field tooltip

On graph page, search field tooltip sometimes goes down to the graph area,
where it used to be covered by foreground element of graph entries (.fg)
because they have z-index: 10.

To prevent the tooltip from being covered, z-index: 15 is enough.

diff --git a/mercurial/templates/static/style-gitweb.css b/mercurial/templates/static/style-gitweb.css
--- a/mercurial/templates/static/style-gitweb.css
+++ b/mercurial/templates/static/style-gitweb.css
@@ -74,6 +74,7 @@ div#hint {
   background: #ffc;
   border: 1px solid yellow;
   border-radius: 5px;
+  z-index: 15;
 }
 
 #searchform:hover div#hint { display: block; }
diff --git a/mercurial/templates/static/style-paper.css b/mercurial/templates/static/style-paper.css
--- a/mercurial/templates/static/style-paper.css
+++ b/mercurial/templates/static/style-paper.css
@@ -90,6 +90,7 @@ form.search div#hint {
   font-size: 70%;
   border: 1px solid yellow;
   border-radius: 5px;
+  z-index: 15;
 }
 
 form.search:hover div#hint { display: block; }
diff --git a/tests/test-hgweb.t b/tests/test-hgweb.t
--- a/tests/test-hgweb.t
+++ b/tests/test-hgweb.t
@@ -336,7 +336,7 @@ static file
 
   $ get-with-headers.py --twice localhost:$HGPORT 'static/style-gitweb.css' - date etag server
   200 Script output follows
-  content-length: 9059
+  content-length: 9074
   content-type: text/css
   
   body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; background: white; color: black; }
@@ -415,6 +415,7 @@ static file
     background: #ffc;
     border: 1px solid yellow;
     border-radius: 5px;
+    z-index: 15;
   }
   
   #searchform:hover div#hint { display: block; }


More information about the Mercurial-devel mailing list