-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#90 fix not worked enableBodyScroll in some conditions #91
Conversation
src/bodyScrollLock.js
Outdated
locks = []; | ||
} else { | ||
locks = locks.filter(lock => lock.targetElement !== targetElement); | ||
} | ||
|
||
if (!locks.length) { | ||
restoreOverflowSetting(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to run this for even ios devices?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@willmcpo I don't tested changes on iOS.
Anyway the same issue can appear on any device, so I assume that this change is required for iOS devices too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can change condition and check if overflow hidden was set and only then invoke restoreOverflowSetting. But moving restoreOverflowSetting to condition above is bad idea, because then code will be more complicated and unreadable through adding same piece of code inside |
Refer to my comment about removing else if block
…On Mon, Jun 17, 2019, 2:28 PM An-Cu ***@***.***> wrote:
I can change condition and check if overflow hidden was set and only then
invoke restoreOverflowSetting. But moving restoreOverflowSetting to
condition above is bad idea, because then code will be more complicated and
unreadable through adding same piece of code inside else and else if
blocks.( WET vs. DRY principle)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#91?email_source=notifications&email_token=ADJPCOWGCVKW6MF5S56GT5TP24HGPA5CNFSM4GSWTZ52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX2ACQQ#issuecomment-502530370>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADJPCOXW2VAA5TD6JADIR2TP24HGPANCNFSM4GSWTZ5Q>
.
|
Ok it seems good for me. I will add commit on Wednesday. |
@willmcpo I updated pull-request. |
thanks for the fix @An-Cu |
here is commit to fix issue #90