Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodlenet
MoodleNet Frontend
Commits
b6956164
Commit
b6956164
authored
Oct 18, 2018
by
Sam Gluck
Browse files
Do not attempt scroll without element;
parent
b9450a9e
Changes
2
Hide whitespace changes
Inline
Side-by-side
package.json
View file @
b6956164
...
...
@@ -8,7 +8,9 @@
"precommit"
:
"lint-staged"
,
"test"
:
"node scripts/test.js --env=jsdom"
,
"styleguide"
:
"styleguidist server"
,
"styleguide:build"
:
"styleguidist build"
"styleguide:build"
:
"styleguidist build"
,
"ol:start:app"
:
"sudo PORT=3002 ./node_modules/forever/bin/forever -c
\"
npm run start
\"
./"
,
"ol:start:styleguide"
:
"sudo ./node_modules/forever/bin/forever -c
\"
npm run styleguide
\"
./"
},
"lint-staged"
:
{
"src/**/*.{js,jsx,ts,tsx,json,css,md}"
:
[
...
...
src/pages/sign-up/SignUp.tsx
View file @
b6956164
...
...
@@ -314,6 +314,9 @@ export default class SignUp extends React.Component<SignUpProps, SignUpState> {
scrollForStep
(
step
)
{
// https://gist.github.com/andjosh/6764939#gistcomment-2047675
function
scrollTo
(
element
,
to
=
0
,
duration
=
1000
)
{
if
(
!
element
)
{
return
;
}
const
start
=
element
.
scrollTop
;
const
change
=
to
-
start
;
const
increment
=
20
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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