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

fix: improve drag handler visibility on IE (#1255) #1256

Merged

Conversation

gregory-bretall
Copy link
Contributor

@gregory-bretall gregory-bretall commented Apr 29, 2019

Make the drag handler opaque, change the color to white to make it stand out more and move the handle so it is more visibly separate from the image

Fixes #1255

I decided to add the styles inline as CKEditor by default already adds the styles in-line and this seemed like a cleaner implementation within the CKEditor framework than trying to implement it using real CSS.

@julien
Copy link
Contributor

julien commented Apr 30, 2019

Just started reviewing :)

@wincent wincent changed the title #1255 Make the drag handler opaque, change the color to white to make… fix: improve drag handler visibility (#1255) Apr 30, 2019
dragHandlerStyle.setAttribute('backgroundColor', 'rgba(255, 255, 255, 1');
dragHandlerStyle.setAttribute('opacity', '1');
dragHandlerStyle.setAttribute('margin-top', '-5px');
dragHandlerStyle.setAttribute('margin-left', '-20px');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if this would belong better inside setupResizer()? I don't know if you consider it to be related to that, but it looks that way to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's technically separate so maybe I should move it out of the if block since I'm not sure that the resizing and the drag and drop handle are explicitly linked functionality

@julien
Copy link
Contributor

julien commented Apr 30, 2019

/cc @antonio-ortega

@gregory-bretall gregory-bretall force-pushed the drag-handler-visibility-fix branch from b3c739c to 62cf005 Compare April 30, 2019 21:44
@gregory-bretall
Copy link
Contributor Author

I made some changes to the branch including moving it outside the if check being used for setupresizer (since I think the drag and drop functionality and resize functionality are supposed to be mutually exclusive) and changed it from var to const

…to make it stand out more and move the handle so it is more visibly separate from the image
@gregory-bretall gregory-bretall force-pushed the drag-handler-visibility-fix branch from 62cf005 to cf60c03 Compare May 1, 2019 22:42
@gregory-bretall
Copy link
Contributor Author

Note: I made another change removing positioning changes as it can potentially conflict with a possible fix to https://issues.liferay.com/browse/LPS-89596 which was originally added to liferay-ckeditor but seems to have not been transferred over to CKEditor 4.11.3. I will look into fixing that again later, but for now not touching the drag handle positioning seems like the best plan.

@wincent
Copy link
Contributor

wincent commented May 3, 2019

originally added to liferay-ckeditor but seems to have not been transferred over to CKEditor 4.11.3. I will look into fixing that again later, but for now not touching the drag handle positioning seems like the best plan.

Good catch. When we did the big CKEditor update we changed the build process quite dramatically, so this will be the first change that we need to integrate using the new workflow. I don't know what the original fix was (because the LPS just updates the version number), but I'm wondering: was it the kind of fix that could potentially be upstreamed into CKEditor itself?

In any case, in the meantime this PR looks good and low-risk so let's go ahead and merge it. Thanks for providing the screenshots to make clear what the before/after looks like.

@wincent wincent changed the title fix: improve drag handler visibility (#1255) fix: improve drag handler visibility on IE (#1255) May 3, 2019
@wincent wincent merged commit 4a7a72a into liferay:master May 3, 2019
@blzaugg
Copy link

blzaugg commented May 3, 2019

See tag 4.6.0.5 for LPS-89596 changes.

@julien
Copy link
Contributor

julien commented May 9, 2019

Hi @blzaugg unfortunately the 4.6.0.5 "tag" does not correspond to the commit you pointed, but to this.

I will try to find a way to have an easy patch workflow.

@wincent
Copy link
Contributor

wincent commented May 9, 2019

This is the specific commit: liferay/liferay-ckeditor@4d8ce3e

@blzaugg
Copy link

blzaugg commented May 9, 2019

Sorry, I was including the range from the previous tag, so all relevant commits were included.

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

Successfully merging this pull request may close these issues.

Drag and Drop Handle is Difficult to See Against Text in IE11
4 participants