Adding a filter to select multiple lines with the Ctrl key in Firefox, but it works fine in Chrome

When I try to select multiple lines using the Ctrl key, the border of the selected td will be blue.

I use this code to check if the Ctrl key is pressed or not:

 $("#unSelectedTab td").click(function (event) { if (event.ctrlKey) { $(this).toggleClass("backgroundcolor"); } else { $("#unSelectedTab td").removeClass("backgroundcolor"); $(this).addClass("backgroundcolor"); } }); 
+4
source share
1 answer

Must be: event.browserEvent.ctrlKey

You should put a breakpoint in Firebug and see which event has the property.

0
source

Source: https://habr.com/ru/post/1480413/


All Articles