mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
minor fix for fake elem
after call clipboard all page scrolls down. As i understand, its relates to fake element, cause its append to body. I just set position to 'fixed' and now it works right. I think 'fixed' is more css-style independence then 'absolute'
This commit is contained in:
parent
3d13baa385
commit
43d9c11aaf
@ -65,7 +65,7 @@ export default class ClipboardAction {
|
||||
this.fakeElem.style.padding = '0';
|
||||
this.fakeElem.style.margin = '0';
|
||||
// Move element out of screen horizontally
|
||||
this.fakeElem.style.position = 'absolute';
|
||||
this.fakeElem.style.position = 'fixed';
|
||||
this.fakeElem.style[ isRTL ? 'right' : 'left' ] = '-9999px';
|
||||
// Move element to the same position vertically
|
||||
this.fakeElem.style.top = (window.pageYOffset || document.documentElement.scrollTop) + 'px';
|
||||
|
Loading…
x
Reference in New Issue
Block a user