Fixed: Suchcontainer nicht mehr verschoben

Groesse und Alignment an Suchfeld gebunden.
This commit is contained in:
Cris
2023-05-25 12:15:24 +02:00
parent 542b6cc985
commit f08072133c
2 changed files with 8 additions and 7 deletions
+6 -2
View File
@@ -15,13 +15,17 @@
position: absolute;
z-index: 9998;
background-color: #fff;
border: 2px solid #666;
border: 1px solid lightgrey;
padding: 1rem;
overflow-y: auto;
top: 100%;
width: 100%;
left: 0;
right: 0;
}
.searchbar_result {
border-bottom: 1px solid #666;
border-bottom: 1px solid lightgrey;
margin-bottom: 1rem;
}
+2 -5
View File
@@ -27,7 +27,7 @@ export default {
organisationunit: organisationunit
},
template: `
<form ref="searchform" class="d-flex me-3" action="javascript:void(0);"
<form ref="searchform" class="d-flex me-3 position-relative" action="javascript:void(0);"
@focusin="this.searchfocusin" @focusout="this.searchfocusout">
<div class="input-group me-2 bg-white">
<input ref="searchbox" @keyup="this.search" @focus="this.showsearchresult"
@@ -78,10 +78,7 @@ export default {
calcSearchResultExtent: function() {
var rect = this.$refs.searchbox.getBoundingClientRect();
//console.log(window.innerWidth + ' ' + window.innerHeight + ' ' + JSON.stringify(rect));
this.$refs.result.style.top = Math.floor(rect.bottom + 3) + 'px';
this.$refs.result.style.right = Math.floor(window.innerWidth - rect.right) + 'px';
this.$refs.result.style.width = Math.floor(window.innerWidth * 0.75) + 'px';
this.$refs.result.style.height = Math.floor(window.innerHeight * 0.75) + 'px';
this.$refs.result.style.height = Math.floor(window.innerHeight * 0.80) + 'px';
},
search: function() {
if( this.searchtimer !== null ) {