Skip to content

Commit

Permalink
Fixed sticky preview on browsers with buggy fixed positioning...
Browse files Browse the repository at this point in the history
  • Loading branch information
istvan-ujjmeszaros committed Feb 14, 2014
1 parent b3c51be commit 21bc421
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion css-gradient-generator.jquery.json
Expand Up @@ -9,7 +9,7 @@
"responsive",
"widget"
],
"version": "2.0.5",
"version": "2.0.6",
"author": {
"name": "Virtuosoft",
"url": "https://github.com/Virtuosoft"
Expand Down
1 change: 1 addition & 0 deletions resources/gradienteditor.css
Expand Up @@ -617,6 +617,7 @@ h1, h2, h3, h4, h5, h6 {
.css-gradient-editor-container .content.css-gradient-editor-swatches {
max-height: 197px;
overflow: auto;
margin-right: -6px;
}

.css-gradient-editor-container .css-gradient-editor-swatches ul {
Expand Down
4 changes: 2 additions & 2 deletions resources/gradienteditor.js
Expand Up @@ -4,7 +4,7 @@

/*!=========================================================================
* CSS Background Generator
* v2.0.5
* v2.0.6
*
* http://www.virtuosoft.eu/tools/css-gradient-generator/
*
Expand Down Expand Up @@ -998,7 +998,7 @@ var CSSGradientEditor = function(container, options) {
sticky = false;
}

if (sticky && !elements.previewarea.hasClass("preview-sticky")) {
if (sticky && (!elements.previewarea.hasClass("preview-sticky") || buggyfixed)) {
if (previewheightbeforestickiness === false) {
previewheightbeforestickiness = elements.previewarea.height();
elements.previewcontainer.height(elements.previewarea.height());
Expand Down

0 comments on commit 21bc421

Please sign in to comment.