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

Bugfix - Tableresize not working in maximized mode with divarea #3694

Merged
merged 6 commits into from
Jun 5, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/tableresize/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@

resizer = CKEDITOR.dom.element.createFromHtml( '<div data-cke-temp=1 contenteditable=false unselectable=on ' +
'style="position:absolute;cursor:col-resize;filter:alpha(opacity=0);opacity:0;' +
'padding:0;background-color:#004;background-image:none;border:0px none;z-index:10"></div>', document );
'padding:0;background-color:#004;background-image:none;border:0px none;z-index:10000"></div>', document );

// Clean DOM when editor is destroyed.
editor.on( 'destroy', function() {
Expand Down
61 changes: 61 additions & 0 deletions tests/plugins/tableresize/manual/maximizeddivarea.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<h2>Classic editor</h2>

<div id="classic">
<p>Classic editor</p>
<table border="1" cellpadding="1" cellspacing="1" style="width:600px">
<thead>
<tr>
<th scope="row" style="width:150px">Header</th>
<th scope="col" style="width:300px" colspan="2">Header</th>
<th scope="col" style="width:150px">Header</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row" style="width:150px">Header</th>
<td style="width:150px">not header</td>
<td style="width:150px">not header</td>
<td style="width:150px">not header</td>
</tr>
<tr>
<th scope="row" style="width:300px" colspan="2">Header</th>
<td style="width:300px" colspan="2">not header</td>
</tr>
</tbody>
</table>
</div>

<h2>Divarea editor</h2>

<div id="divarea">
<p>Divarea editor</p>
<table border="1" cellpadding="1" cellspacing="1" style="width:600px">
<thead>
<tr>
<th scope="row" style="width:150px">Header</th>
<th scope="col" style="width:300px" colspan="2">Header</th>
<th scope="col" style="width:150px">Header</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row" style="width:150px">Header</th>
<td style="width:150px">not header</td>
<td style="width:150px">not header</td>
<td style="width:150px">not header</td>
</tr>
<tr>
<th scope="row" style="width:300px" colspan="2">Header</th>
<td style="width:300px" colspan="2">not header</td>
</tr>
</tbody>
</table>
</div>

<script>
CKEDITOR.replace( 'classic', {
removePlugins: 'divarea'
} );

CKEDITOR.replace( 'divarea' );
</script>
17 changes: 17 additions & 0 deletions tests/plugins/tableresize/manual/maximizeddivarea.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@bender-ui: collapsed
@bender-tags: bug, 909, 1959, 4.14.1
@bender-ckeditor-plugins: toolbar, wysiwygarea, sourcearea, divarea, tableresize, maximize

*Repeat below steps in all editors.*

1. Maximize editor by pressing maximize button.

1. Try to resize table inside editor.

### Expected

It is possible to resize the table or any of its columns (using CKEditor 4 resizer).

### Unexpected

Not possible to resize the table (resize cursor is not visible).
41 changes: 41 additions & 0 deletions tests/plugins/tableresize/manual/maximizedinlinedivarea.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<style>
.container {
position: absolute;
width: 800px;
height: 300px;
z-index: 10000;
}
</style>

<h2>Inline editor</h2>

<div class="container">
<div id="inline" contenteditable="true">
<p>Inline editor</p>
<table border="1" cellpadding="1" cellspacing="1" style="width:600px">
<thead>
<tr>
<th scope="row" style="width:150px">Header</th>
<th scope="col" style="width:300px" colspan="2">Header</th>
<th scope="col" style="width:150px">Header</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row" style="width:150px">Header</th>
<td style="width:150px">not header</td>
<td style="width:150px">not header</td>
<td style="width:150px">not header</td>
</tr>
<tr>
<th scope="row" style="width:300px" colspan="2">Header</th>
<td style="width:300px" colspan="2">not header</td>
</tr>
</tbody>
</table>
</div>
</div>

<script>
CKEDITOR.inline( 'inline' );
</script>
13 changes: 13 additions & 0 deletions tests/plugins/tableresize/manual/maximizedinlinedivarea.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@bender-ui: collapsed
@bender-tags: bug, 909, 1959, 4.14.1
@bender-ckeditor-plugins: toolbar, wysiwygarea, sourcearea, divarea, floatingspace, tableresize, maximize

1. Try to resize table inside editor.

### Expected

It is possible to resize the table or any of its columns (using CKEditor 4 resizer).

### Unexpected

Not possible to resize the table (resize cursor is not visible).