Skip to content

Commit 4a633f1

Browse files
committed
Fix search results rendered partially off-screen on mobile (Closes #150)
1 parent b7c0c2d commit 4a633f1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

template/search_template.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ $(function(){
44
if ( ! ui.content.length ) { $('#search').addClass( 'not-found') }
55
else { $('#search').removeClass('not-found') }
66
},
7+
open: function() {
8+
var ui_el = $('.ui-autocomplete');
9+
if ( ui_el.offset().left < 0 ) {
10+
ui_el.css({left: 0})
11+
}
12+
},
713
position: { my: "right top", at: "right bottom", of: "#search div" },
814
source: [
915
ITEMS

0 commit comments

Comments
 (0)