hi,

On normal PC screen, Search box in top Navigation region works well. But switching to smaller screens, it cannot be focused any more (see attachment). Instead, I've just got a link ("New") next to it when I was attempting to click this box.

How to fix it? Thanks.

CommentFileSizeAuthor
Screenshot-2.png141.49 KBhenryhu

Comments

TheJoker’s picture

Henry Hu, need remove attribute size="15" on input search form.

henryhu’s picture

Thank you TheJoker,

How to remove it? I tried hook_form_alter(), but could not find the attribute definition.

And I found that a solution was remove "float: left" style. But I do not know how to remove it just for small screens.

TheJoker’s picture

I do not know why the developers have included a class in the form, because by default, elements are aligned to the left. Sorry, writing patch and experimenting I have no time. But you can change it in the theme Bootstrap.

Go to the bootstrap\includes\form.inc

Remove the line of code 49 ($ form ['# attributes'] [' class'] [] = 'pull-left' ;) and if you need to remove the size, then add back ($ form ['search_block_form'] ['# attributes '] [' size '] [] ='';).

I do not remember, maybe you can copy this function on you themplate.php and make the changes there. This eliminates the need to do the same with the update if it is not fixed, of course.

markhalliwell’s picture

Status: Active » Closed (duplicate)