Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Position:fixed (IE6 javascript fallback), with pointer-events:none #3

Merged
merged 2 commits into from

2 participants

@shalecraig

The rest of the commit will be coming in a minute.

@shalecraig

This is the second time that the github in-line editor has done this... :(

@shalecraig shalecraig Pointer events and position fixing
Pointer events: none to allow you to click through the dividers
Fallback for IE6, with an important flag.
2ebc9cb
@peol peol merged commit 677b61a into peol:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 27, 2011
  1. @shalecraig
  2. @shalecraig

    Pointer events and position fixing

    shalecraig authored
    Pointer events: none to allow you to click through the dividers
    Fallback for IE6, with an important flag.
This page is out of date. Refresh to see the latest.
View
7 releases/latest/960.gridder.src.css
@@ -5,7 +5,7 @@
/* SETUP */
#g-setup {
- position: absolute;
+ position: fixed;
top: 150px;
left: -310px;
padding: 6px;
@@ -15,6 +15,11 @@
background-color: #d1cfe6;
border: 2px solid #a19bd1;
z-index: 2100;
+ pointer-events: none;
+}
+
+* html #g-setup {
+ position: absolute!important;
}
#g-setup * {
View
16 releases/latest/960.gridder.src.js
@@ -3,7 +3,7 @@
*/
/*!
- * Copyright (c) Andrée Hansson (peolanha AT gmail DOT com)
+ * Copyright (c) Andr�e Hansson (peolanha AT gmail DOT com)
* MIT License - http://www.opensource.org/licenses/mit-license.php
* Idea loosely based on JASH, http://billyreisinger.com/jash/
*
@@ -168,7 +168,9 @@ function Grid() {
}
// Hook the show/hide text to toggle
- jQuery('#g-setup').css('top', jQuery(window).scrollTop() + 150);
+ if (!jQuery.support.fixedPosition) {
+ jQuery('#g-setup').css('top', jQuery(window).scrollTop() + 150);
+ }
jQuery('#g-setup-tab a').click(function () {
me.toggleSetupWindow();
});
@@ -199,10 +201,12 @@ function Grid() {
}
});
- // FIXME: I wan't to remove this, replace it with position: fixed;
- jQuery(window).scroll(function () {
- jQuery('#g-setup').css('top', jQuery().scrollTop() + 150);
- });
+ // Falls back to scrolling it manually (for #IE6)[ugh, I know]
+ if(!jQuery.support.fixedPosition) {
+ jQuery(window).scroll(function () {
+ jQuery('#g-setup').css('top', jQuery().scrollTop() + 150);
+ });
+ }
}
// We're checking if CTRL+ALT and one of toggle keys has been pressed
Something went wrong with that request. Please try again.