Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
56126c9a
Commit
56126c9a
authored
Nov 05, 2016
by
杨奕
Committed by
GitHub
Nov 05, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #842 from baiyaaaaa/master
fix ie bounding top bug
parents
07cd2306
cd16a0b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
build/cooking.demo.js
build/cooking.demo.js
+1
-1
src/utils/popper.js
src/utils/popper.js
+11
-2
No files found.
build/cooking.demo.js
View file @
56126c9a
...
@@ -91,5 +91,5 @@ if (process.env.NODE_ENV === 'production') {
...
@@ -91,5 +91,5 @@ if (process.env.NODE_ENV === 'production') {
cooking
.
add
(
'
vue.preserveWhitespace
'
,
false
);
cooking
.
add
(
'
vue.preserveWhitespace
'
,
false
);
cooking
.
add
(
'
output.chunkFilename
'
,
'
element.[id].[chunkhash:7].js
'
);
cooking
.
add
(
'
output.chunkFilename
'
,
'
element.[id].[chunkhash:7].js
'
);
cooking
.
add
(
'
output.filename
'
,
'
element.[name].[
chunk
hash:7].js
'
);
cooking
.
add
(
'
output.filename
'
,
'
element.[name].[hash:7].js
'
);
module
.
exports
=
cooking
.
resolve
();
module
.
exports
=
cooking
.
resolve
();
src/utils/popper.js
View file @
56126c9a
...
@@ -1148,13 +1148,22 @@
...
@@ -1148,13 +1148,22 @@
*/
*/
function
getBoundingClientRect
(
element
)
{
function
getBoundingClientRect
(
element
)
{
var
rect
=
element
.
getBoundingClientRect
();
var
rect
=
element
.
getBoundingClientRect
();
// whether the IE version is lower than 11
var
isIE
=
navigator
.
userAgent
.
indexOf
(
"
MSIE
"
)
!=
-
1
;
// fix ie document bouding top always 0 bug
var
rectTop
=
isIE
&&
element
.
tagName
===
'
HTML
'
?
-
element
.
scrollTop
:
rect
.
top
;
return
{
return
{
left
:
rect
.
left
,
left
:
rect
.
left
,
top
:
rect
.
t
op
,
top
:
rect
T
op
,
right
:
rect
.
right
,
right
:
rect
.
right
,
bottom
:
rect
.
bottom
,
bottom
:
rect
.
bottom
,
width
:
rect
.
right
-
rect
.
left
,
width
:
rect
.
right
-
rect
.
left
,
height
:
rect
.
bottom
-
rect
.
t
op
height
:
rect
.
bottom
-
rect
T
op
};
};
}
}
...
...
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