Skip to content

Commit

Permalink
modify: #209, #213 hide cell controller,
Browse files Browse the repository at this point in the history
fix: #210 disabled status- it's can table edited
fix: #214 disabled button cursor pointer
  • Loading branch information
JiHong88 committed Feb 14, 2020
1 parent 3e18b39 commit 1d8f49c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/assets/css/suneditor.css
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
.sun-editor .se-btn:enabled.on:hover, .sun-editor .se-btn:enabled.on:focus {background-color:#d1d1d1; border-color:#c1c1c1; outline:0 none;}
.sun-editor .se-btn:enabled.on:active {background-color:#c1c1c1; border-color:#b1b1b1; -webkit-box-shadow:inset 0 3px 5px #b1b1b1; box-shadow:inset 0 3px 5px #b1b1b1;}
/* disabled buttons, icon blur */
.sun-editor .se-btn:disabled, .sun-editor .se-btn-list:disabled, .sun-editor :disabled [class*='se-icon-']::before {cursor:not-allowed; background-color:inherit; color:#bdbdbd;}
.sun-editor .se-btn:disabled, .sun-editor .se-btn-list:disabled, .sun-editor button:disabled {cursor:not-allowed; background-color:inherit; color:#bdbdbd;}

/** --- loading box */
.sun-editor .se-loading-box {position:absolute; display:none; width:100%; height:100%; top:0; left:0; background-color:#fff; opacity:.7; filter:alpha(opacity=70); z-index:2147483647;}
Expand Down
2 changes: 2 additions & 0 deletions src/lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -3686,6 +3686,8 @@ export default function (context, pluginCallButtons, plugins, lang, _options) {
* @warning Events are registered only when there is a table plugin.
*/
onMouseDown_wysiwyg: function (e) {
if (context.element.wysiwyg.getAttribute('contenteditable') === 'false') return;

const tableCell = util.getParentElement(e.target, util.isCell);
if (tableCell) {
const tablePlugin = core.plugins.table;
Expand Down
6 changes: 6 additions & 0 deletions src/plugins/submenu/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,12 @@ export default {

/** table edit controller */
call_controller_tableEdit: function (tdElement) {
if (!this.getSelection().isCollapsed) {
this.controllersOff();
this.util.removeClass(tdElement, 'se-table-selected-cell');
return;
}

const contextTable = this.context.table;
const tablePlugin = this.plugins.table;
const tableController = contextTable.tableController;
Expand Down

0 comments on commit 1d8f49c

Please sign in to comment.