dotjay / hashgrid

A little tool that inserts a layout grid in web pages, allows you to hold it in place, and toggle between displaying it in the foreground or background.
https://dotjay.github.io/hashgrid/
Other
446 stars 46 forks source link

Keydown doesnt show grid #13

Open alvarix opened 11 years ago

alvarix commented 11 years ago

The grid is there, I can dev tool it and change it's property to make it appear. It is one particular wp site.

I tried disabling all the other javascripts I could access, disabled all plugins, and moved the script tag to various locations but nothing will make it work.

I used an older version of the script that works on another wp site.

Unfortunately I can't share the site at the moment. Do you have any tips how I may debug this?

dotjay commented 11 years ago

My apologies for the delay. My guess would be that a WP plugin is hijacking the keydown event and not allowing the event to pass through, but odd that hashgrid still doesn't work when all plugins are disabled. Have you tried using a DOM inspector dev tool to put a breakpoint on the keydown event and step through the script(s)?

alvarix commented 11 years ago

Turns out if you omit the css for the horizontal grid lines the script fails.

grid div.horiz{

... }

I dont usually care about the hor grid...

dotjay commented 11 years ago

Ah, got it! Well done. I'll fix the script to not fail on that. Of course, the CSS could be left in to hide the horizontal grid lines like so:

#grid div.horiz{
display: none !important;
}