Skip to content

Commit 39d2617

Browse files
xuvdanvk
authored andcommitted
Solves slider and image positioning problem in Firefox (#109)
* Solves issue #108 : Swipe and Onion skin slider not showing in Firefox * Adding a comment to explain the Firefox display 'hack' * Solves the image positioning problem with Swipe in Firefox * Removed dotted outline in Firefox
1 parent a0f7125 commit 39d2617

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

webdiff/static/css/style.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,15 @@ ul.file-list {
115115
.onion-skin input {
116116
width: 200px;
117117
}
118+
.swipe input,
119+
.onion-skin input {
120+
background-color: transparent; /* So it displays in Firefox */
121+
margin: 0;
122+
}
123+
/* Remove dotted outline in Firefox*/
124+
input::-moz-focus-outer{
125+
border: 0;
126+
}
118127
.shrink-to-fit {
119128
max-width: 100%;
120129
}

webdiff/static/js/image.jsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ var ImageSwipe = React.createClass({
428428
left: Math.floor(frac * imB.width) + 'px',
429429
width: null,
430430
right: containerWidth - imB.width + 'px',
431-
'backgroundPositionX': -Math.floor(frac * imB.width) + 'px'
431+
'backgroundPosition': -Math.floor(frac * imB.width) + 'px top'
432432
});
433433
} else {
434434
_.extend(styleB, {opacity: frac});
@@ -440,9 +440,6 @@ var ImageSwipe = React.createClass({
440440
if (_.has(o, 'backgroundSize')) {
441441
o['backgroundSize'] += ', auto auto';
442442
}
443-
if (_.has(o, 'backgroundPositionX')) {
444-
o['backgroundPositionX'] += ', ' + o['backgroundPositionX'];
445-
}
446443
});
447444

448445
return (

0 commit comments

Comments
 (0)