Ask Your Question
0

live search issue with enter key on sandbox

asked 2013-02-27 16:03:55 -0500

jeffmad gravatar image

updated 2013-02-27 16:15:42 -0500

with latest code 0.7.48

On askbot.org if I do live search (e.g. migration) and then use up and down arrow keys to select a question on the drop menu and then press enter key when I find the one I want to see, everything works fine.

In my sandbox on the other hand, (python setup.py develop; python manage.py runserver '127.0.0.1:8000') then the enter key does not take me to the question. Instead I am taken to some other search (http://localhost:8000/questions/scope:all/sort:activity-desc/query:abacus/page:1/).

I have narrowed down the problem to two "keydown" handlers getting installed.

in live_search.js, FullTextSearch sets the keydown hander

// enable query box
var main_page_eval_handle;
//this._query.keydown(this.makeKeyDownHandler());
this._query.keyup(function(e){

and SearchDropMenu installs another keydown handler in createDom

$(document).keydown(this.makeKeyHandler());

It seems to me that the handler in SearchDropMenu performs the correct action - navigating to the url of the item. I commented out the keydown for FullTextSearch and it works as expected.

The mysterious part for me is that I used Chrome to test this my sandbox and askbot.org/en/questions side by side. Using the debugger, I could see that the askbot.org executed the proper keydown handler every time and on my sandbox it executed the other keydown handler every time.

Should there be only one key event handler? Is there something different about production and sandbox that would make one execute instead of another?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-02-27 16:13:49 -0500

Evgeny gravatar image

Jeff, please try the latest code from the repository. I have made some changes to the search, and hopefully this issue resolves. Sorry, I cannot look into this unless the issue is still present in the repository.

edit flag offensive delete link more

Comments

I am using latest code: $ git log -2 commit cec681f1b4551e3d8588cf2d22e4eae3a8c08b66 Author: Evxxxx Fxxxxx <xxxx> Date: Tue Feb 26 19:38:21 2013 -0300

allowed search by email address in the user search bar
jeffmad gravatar imagejeffmad ( 2013-02-27 16:25:54 -0500 )edit

And you still have this issue?

Evgeny gravatar imageEvgeny ( 2013-02-27 16:28:42 -0500 )edit

Allright, thanks I can reproduce this, will get it fixed soon. The enter key in the search bar must initiate the full text search, while enter key on the dropdown when the selection is made - should take you to the corresponding question.

Evgeny gravatar imageEvgeny ( 2013-02-27 16:31:10 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-02-27 16:03:55 -0500

Seen: 88 times

Last updated: Feb 27 '13