Skip to content
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

Safari cursor update bug #88

Open
Sauvage9 opened this issue Apr 13, 2017 · 1 comment
Open

Safari cursor update bug #88

Sauvage9 opened this issue Apr 13, 2017 · 1 comment

Comments

@Sauvage9
Copy link

Sauvage9 commented Apr 13, 2017

I'm styling cursors via cssText by calling this.fixCss(1); in reorder
followed by this.fixCss(0) in reorder:onEnd (requires cssMap:{}, in prototype)

fixCss:function(state){
	if(state){
		this.cssMap.body=document.body.style.cssText;document.body.style.cssText=this.cssMap.body+'-moz-user-select:none;-webkit-user-select:none;user-select:none;cursor:move;cursor:-webkit-grabbing;cursor:grabbing';
		this.cssMap.node=this.target.node.style.cssText;this.target.node.style.cssText=this.cssMap.node+'-moz-user-select:none;-webkit-user-select:none;user-select:none;cursor:move;cursor:-webkit-grabbing;cursor:grabbing';
		if(this.target.originalTarget!=this.target.node){this.cssMap.originalTarget=this.target.originalTarget.style.cssText;this.target.originalTarget.style.cssText=this.cssMap.originalTarget+'cursor:inherit'};
	}else{
		if(document.body.style.cssText!=this.cssMap.body){document.body.style.cssText=this.cssMap.body};
		if(this.target.node.style.cssText!=this.cssMap.node){this.target.node.style.cssText=this.cssMap.node};
		if(this.target.originalTarget!=this.target.node&&this.target.originalTarget.style.cssText!=this.cssMap.originalTarget){this.target.originalTarget.style.cssText=this.cssMap.originalTarget};
	};
},

This works perfectly in Chrome & Firefox but is buggy in Safari.
Safari cursor changes when otherNodes are in transition.
I would love to see this fixed...

@Sauvage9
Copy link
Author

Fixed

Apparently Safari suffers from the same compositorDoesNotOrderLayers bug as Chrome, although in a slightly different fashion.

Changing
if (compositorDoesNotOrderLayers) {this.container.style.webkitTransformStyle = 'preserve-3d'}
to this.container.style.webkitTransformStyle = 'preserve-3d'; does the trick and since it's vendor prefixed you don't need to worry about other browsers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant