Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ardublockly
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ardublockly
Commits
2d11522c
Commit
2d11522c
authored
Oct 01, 2015
by
Neil Fraser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop Firefox from jumping when widget div is displayed. Issue 186.
parent
6f924e34
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
core/widgetdiv.js
core/widgetdiv.js
+5
-0
tests/playground.html
tests/playground.html
+2
-2
No files found.
core/widgetdiv.js
View file @
2d11522c
...
...
@@ -30,6 +30,7 @@ goog.provide('Blockly.WidgetDiv');
goog
.
require
(
'
Blockly.Css
'
);
goog
.
require
(
'
goog.dom
'
);
goog
.
require
(
'
goog.style
'
);
/**
...
...
@@ -75,6 +76,10 @@ Blockly.WidgetDiv.show = function(newOwner, rtl, dispose) {
Blockly
.
WidgetDiv
.
hide
();
Blockly
.
WidgetDiv
.
owner_
=
newOwner
;
Blockly
.
WidgetDiv
.
dispose_
=
dispose
;
// Temporarily move the widget to the top of the screen so that it does not
// cause a scrollbar jump in Firefox when displayed.
var
xy
=
goog
.
style
.
getViewportPageOffset
(
document
);
Blockly
.
WidgetDiv
.
DIV
.
style
.
top
=
xy
.
y
+
'
px
'
;
Blockly
.
WidgetDiv
.
DIV
.
style
.
direction
=
rtl
?
'
rtl
'
:
'
ltr
'
;
Blockly
.
WidgetDiv
.
DIV
.
style
.
display
=
'
block
'
;
};
...
...
tests/playground.html
View file @
2d11522c
...
...
@@ -87,8 +87,8 @@ function start() {
{
enabled
:
true
,
controls
:
true
,
wheel
:
true
,
maxScale
:
2
,
minScale
:
.
1
,
maxScale
:
4
,
minScale
:
.
25
,
scaleSpeed
:
1.1
},
});
...
...
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