Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
bootstrap
Commits
09072442
Commit
09072442
authored
Mar 17, 2014
by
Tyler Cipriani
Committed by
Chris Rebert
Mar 28, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modal body shift fix for IE10/11
Closes #13103 by merging it.
parent
28e6c342
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
20 deletions
+30
-20
dist/js/bootstrap.js
dist/js/bootstrap.js
+14
-9
dist/js/bootstrap.min.js
dist/js/bootstrap.min.js
+1
-1
docs/dist/js/bootstrap.min.js
docs/dist/js/bootstrap.min.js
+1
-1
js/modal.js
js/modal.js
+14
-9
No files found.
dist/js/bootstrap.js
View file @
09072442
...
...
@@ -795,11 +795,12 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
// ======================
var
Modal
=
function
(
element
,
options
)
{
this
.
options
=
options
this
.
$body
=
$
(
document
.
body
)
this
.
$element
=
$
(
element
)
this
.
$backdrop
=
this
.
isShown
=
null
this
.
options
=
options
this
.
$body
=
$
(
document
.
body
)
this
.
$element
=
$
(
element
)
this
.
$backdrop
=
this
.
isShown
=
null
this
.
scrollbarWidth
=
0
if
(
this
.
options
.
remote
)
{
this
.
$element
...
...
@@ -830,6 +831,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
this
.
isShown
=
true
this
.
checkScrollbar
()
this
.
$body
.
addClass
(
'
modal-open
'
)
this
.
setScrollbar
()
...
...
@@ -976,11 +978,14 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
}
}
Modal
.
prototype
.
checkScrollbar
=
function
()
{
if
(
document
.
body
.
clientWidth
>=
window
.
innerWidth
)
return
this
.
scrollbarWidth
=
this
.
scrollbarWidth
||
this
.
measureScrollbar
()
}
Modal
.
prototype
.
setScrollbar
=
function
()
{
if
(
document
.
body
.
clientHeight
<=
window
.
innerHeight
)
return
var
scrollbarWidth
=
this
.
measureScrollbar
()
var
bodyPad
=
parseInt
(
this
.
$body
.
css
(
'
padding-right
'
)
||
0
)
if
(
scrollbarWidth
)
this
.
$body
.
css
(
'
padding-right
'
,
bodyPad
+
scrollbarWidth
)
var
bodyPad
=
parseInt
(
this
.
$body
.
css
(
'
padding-right
'
)
||
0
)
if
(
this
.
scrollbarWidth
)
this
.
$body
.
css
(
'
padding-right
'
,
bodyPad
+
this
.
scrollbarWidth
)
}
Modal
.
prototype
.
resetScrollbar
=
function
()
{
...
...
dist/js/bootstrap.min.js
View file @
09072442
This diff is collapsed.
Click to expand it.
docs/dist/js/bootstrap.min.js
View file @
09072442
This diff is collapsed.
Click to expand it.
js/modal.js
View file @
09072442
...
...
@@ -14,11 +14,12 @@
// ======================
var
Modal
=
function
(
element
,
options
)
{
this
.
options
=
options
this
.
$body
=
$
(
document
.
body
)
this
.
$element
=
$
(
element
)
this
.
$backdrop
=
this
.
isShown
=
null
this
.
options
=
options
this
.
$body
=
$
(
document
.
body
)
this
.
$element
=
$
(
element
)
this
.
$backdrop
=
this
.
isShown
=
null
this
.
scrollbarWidth
=
0
if
(
this
.
options
.
remote
)
{
this
.
$element
...
...
@@ -49,6 +50,7 @@
this
.
isShown
=
true
this
.
checkScrollbar
()
this
.
$body
.
addClass
(
'
modal-open
'
)
this
.
setScrollbar
()
...
...
@@ -195,11 +197,14 @@
}
}
Modal
.
prototype
.
checkScrollbar
=
function
()
{
if
(
document
.
body
.
clientWidth
>=
window
.
innerWidth
)
return
this
.
scrollbarWidth
=
this
.
scrollbarWidth
||
this
.
measureScrollbar
()
}
Modal
.
prototype
.
setScrollbar
=
function
()
{
if
(
document
.
body
.
clientHeight
<=
window
.
innerHeight
)
return
var
scrollbarWidth
=
this
.
measureScrollbar
()
var
bodyPad
=
parseInt
(
this
.
$body
.
css
(
'
padding-right
'
)
||
0
)
if
(
scrollbarWidth
)
this
.
$body
.
css
(
'
padding-right
'
,
bodyPad
+
scrollbarWidth
)
var
bodyPad
=
parseInt
(
this
.
$body
.
css
(
'
padding-right
'
)
||
0
)
if
(
this
.
scrollbarWidth
)
this
.
$body
.
css
(
'
padding-right
'
,
bodyPad
+
this
.
scrollbarWidth
)
}
Modal
.
prototype
.
resetScrollbar
=
function
()
{
...
...
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