-
Notifications
You must be signed in to change notification settings - Fork 385
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
Applies Position relative on init if the element is fixed positioned #60
Comments
You can overwrite the position of the container with |
Hi... It was really weird to find this as a solution for draggabilly, when in the website this option is absent. It makes me think that there are another options for draggabilly... |
what abput fixed position style? |
@desandro the link you shared for this was related to masonry.. when i tried the same option with draggabilly, nothing happened |
This issue was fixed in v2.1.1. See #134 |
I appreciate that but I have already read that ticket and this is not my case. My elements are not position fixed, they are already styled with position absolute. In fact my temporary solution was just to !important the absolute position in my CSS to override the relative that is applied from the plugin. I checked I am using the exact version claiming to have fixed this, and even looked at the source where it hard coded position relative. Please take another look and tell me what actually needs to be done to fix this.
…Sent from my iPhone
On Sep 5, 2017, at 11:00 PM, David DeSandro ***@***.***> wrote:
This issue was fixed in v2.1.1. See #134
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
please see this, by default if the element is styled with position absolute it forces them to be relative. why is this? // css position values that don't need to be set
var positionValues = {
relative: true,
absolute: true,
fixed: true
};
proto._create = function() {
// properties
this.position = {};
this._getPosition();
this.startPoint = { x: 0, y: 0 };
this.dragPoint = { x: 0, y: 0 };
this.startPosition = extend( {}, this.position );
// set relative positioning
var style = getComputedStyle( this.element );
if ( !positionValues[ style.position ] ) {
this.element.style.position = 'relative';
}
this.enable();
this.setHandles();
}; |
I'm not able to reproduce that bug. See demo https://codepen.io/desandro/pen/ac004626de5f69410b880d4bd215e2f8/ |
Yea, i can't seem to cause it now either - I must have had an issue somewhere. |
In
_create
we have..The text was updated successfully, but these errors were encountered: