-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 for: Dragging widget in read-only mode #865
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix seems to be working correctly, but I'm lacking proper unit tests. Please see also other issues with tests.
plugins/clipboard/plugin.js
Outdated
@@ -1388,6 +1388,11 @@ | |||
// Cancel native drop. | |||
evt.data.preventDefault(); | |||
|
|||
// #808 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, elaborate a little bit more.
tests/tickets/gh808/manual/1.md
Outdated
@@ -0,0 +1,11 @@ | |||
@bender-tags: 4.7.3, bug, 808 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test could be moved to other clipboard tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed test's name and improvement formatting of comment in code.
However unit test is failing in IE8.
@engineering-this please take over this PR |
ec7016c
to
557a35d
Compare
Pushed changes:
|
6dfa6e6
to
b09a563
Compare
0da0013
to
cd20329
Compare
plugins/widget/plugin.js
Outdated
@@ -66,6 +62,16 @@ | |||
'.cke_widget_drag_handler_container:hover{' + | |||
'opacity:1' + | |||
'}' + | |||
'.cke_widget_drag_handler_container_hidden{' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of introducing such class? It seems to be never applied to the widget's drag handler, causing funny bug when editor is loaded while mouse cursor is over place in which widget will appear:
Additionally I don't see a need to add such class. If display: none
is a default style, it can be directly added to other styles of drag handler – no need of introducing another class.
plugins/widget/plugin.js
Outdated
// widget's outline far to the left (https://dev.ckeditor.com/ticket/12024). | ||
'display:none;' + | ||
'}' + | ||
'.cke_editable[contenteditable="false"] .cke_widget_drag_handler_container{' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add some comment with ticket reference to this style.
plugins/widget/plugin.js
Outdated
} ); | ||
this.dragHandlerContainer.removeClass( '.cke_widget_drag_handler_container_hidden' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After removing this class this line won't be needed, but please note that removeClass
takes class name without dot at the beginning.
I've moved |
Rebased onto latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
What is the purpose of this pull request?
Bug fix
Does your PR contain necessary tests?
All patches which change the editor code must include tests. You can always read more
on PR testing,
how to set the testing environment and
how to create tests
in the official CKEditor documentation.
This PR contains
What changes did you make?
Check if editor is in read only mode.
Closes #808.
Closes #3260.