[Phpmyadmin-devel] JavaScript Help for Bug #4279

Dhananjay Nakrani dhananjaynakrani at gmail.com
Fri Feb 14 05:33:01 CET 2014

Hello everyone,

I am trying to solve
Bug#4279<http://sourceforge.net/p/phpmyadmin/bugs/4279/> with
Pull#923 <https://github.com/phpmyadmin/phpmyadmin/pull/923>.

I've successfully solved first part of the bug report. But in the second
part I am stuck a little. So I want suggestions from developer community.

Here's the scenario, as per my understanding.

   1. For select-box, on UP/DOWN arrow key events, values change as per its
   default behavior.
   2. A function named onKeyDownArrowsHandler() is called whenever CTRL +
   UP or DOWN is pressed.

Now on pressing CTRL + UP/DOWN, both of the above events are fired.

What I want to do is to differentiate between *CTRL + UP/DOWN* and *only
UP/DOWN* in  onKeyDownArrowsHandler() function. Or in other way I want to
suppress default behavior of select-box if it's pressed in combination with
CTRL key.

I tried printing keyCode in log, but it only shows keyCode of either CTRL
or UP/DOWN depending on whichever is pressed first.

I also tried e.preventDefault() , but that does not work with select-box
either. After a little searching around on internet, I came across some bug
reports of Mozilla. See
 and MozillaBug#291082 <https://bugzilla.mozilla.org/show_bug.cgi?id=291082>

Is there any other way of achieving the same..??

Please give your valuable suggestions.

Dhananjay R. Nakrani,
Undergraduate Student,
CSE Department,
Institute Of Technology,
Nirma University,
Ahmedabad, India.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20140214/e1905e66/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 328.png
Type: image/png
Size: 569 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20140214/e1905e66/attachment.png>

More information about the Developers mailing list