Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
75c22f56
Commit
75c22f56
authored
Sep 22, 2017
by
Harry Rein
Committed by
GitHub
Sep 22, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16071 from edx/HarryRein/LEARNER-2471-safari-sock-issue
Fixing sock issue on master in safari.
parents
3088c70f
2fa8fa22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
openedx/features/course_experience/static/course_experience/js/CourseSock.js
+4
-4
No files found.
openedx/features/course_experience/static/course_experience/js/CourseSock.js
View file @
75c22f56
...
...
@@ -5,6 +5,7 @@ export class CourseSock { // eslint-disable-line import/prefer-default-export
const
$toggleActionButton
=
$
(
'.action-toggle-verification-sock'
);
const
$verificationSock
=
$
(
'.verification-sock .verification-main-panel'
);
const
$upgradeToVerifiedButton
=
$
(
'.verification-sock .action-upgrade-certificate'
);
const
$miniCert
=
$
(
'.mini-cert'
);
const
pageLocation
=
window
.
location
.
href
.
indexOf
(
'courseware'
)
>
-
1
?
'Course Content Page'
:
'Home Page'
;
...
...
@@ -20,18 +21,17 @@ export class CourseSock { // eslint-disable-line import/prefer-default-export
const
endFixed
=
(
startFixed
+
$verificationSock
.
height
())
-
220
;
// Ensure update button stays in sock even when max-width is exceeded
const
distLeft
=
(
$verificationSock
.
offset
().
left
+
$verificationSock
.
width
())
-
(
$upgradeToVerifiedButton
.
width
()
+
22
);
const
distRight
=
window
.
outerWidth
-
(
$miniCert
.
offset
().
left
+
$miniCert
.
width
());
// Update positioning when scrolling is in fixed window and screen width is sufficient
if
((
documentBottom
>
startFixed
&&
documentBottom
<
endFixed
)
||
$
(
window
).
width
()
<
960
)
{
$upgradeToVerifiedButton
.
addClass
(
'attached'
);
$upgradeToVerifiedButton
.
css
(
'
left'
,
`
${
distLef
t
}
px`
);
$upgradeToVerifiedButton
.
css
(
'
right'
,
`
${
distRigh
t
}
px`
);
}
else
{
// If outside sliding window, reset to un-attached state
$upgradeToVerifiedButton
.
removeClass
(
'attached'
);
$upgradeToVerifiedButton
.
css
(
'
left'
,
'auto
'
);
$upgradeToVerifiedButton
.
css
(
'
right'
,
'20px
'
);
// Add class to define absolute location
if
(
documentBottom
<
startFixed
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment