Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Commit 606fc86

Browse files
authored
fix: Remove inline editing toggle on touch devices not to clobber view with unused elements (#618)
1 parent cc7f1c8 commit 606fc86

File tree

6 files changed

+12
-3
lines changed

6 files changed

+12
-3
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Changelog
55
Unreleased
66
==========
77

8+
* Removed inline editing toggle button from touch devices (where it is inactive anyways) and collapsed menus
9+
810

911
5.1.0 (2022-03-24)
1012
==================

djangocms_text_ckeditor/static/djangocms_text_ckeditor/css/cms.inline-ckeditor.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@
55
.cke_reset_all div.cke_dialog_page_contents > table {
66
height: 100%;
77
}
8+
9+
div.cms .cms-more-buttons a.cms-btn.cms-edit-toggle {
10+
display: none;
11+
}

djangocms_text_ckeditor/static/djangocms_text_ckeditor/js/cms.ckeditor.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,9 @@
463463
CMS.CKEditor.touchdevice = 'ontouchstart' in window || navigator.msMaxTouchPoints; // on touch device?
464464
if (!CMS.CKEditor.touchdevice) { // no inline editing on touch devices to not interfere with scrolling
465465
CMS.CKEditor.initInlineEditors();
466+
$('div.cms a.cms-btn.cms-edit-toggle').show();
467+
} else {
468+
$('div.cms a.cms-btn.cms-edit-toggle').hide();
466469
}
467470
CMS.CKEditor.initAdminEditors();
468471
},

djangocms_text_ckeditor/static/djangocms_text_ckeditor/js/dist/bundle-1c5205cc04.cms.ckeditor.min.js renamed to djangocms_text_ckeditor/static/djangocms_text_ckeditor/js/dist/bundle-3d3a4963e8.cms.ckeditor.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<a href="{{ url }}" title="{{ name }}" style="font-family: django-cms-iconfont;" class="cms-btn{% if active %} cms-btn-active{% endif %}{% if disabled %} cms-btn-disabled{% endif %}"><span{% if extra_classes %} class="{{ extra_classes|join:' ' }}"{% endif %}></span></a>
1+
<a href="{{ url }}" title="{{ name }}" style="font-family: django-cms-iconfont;" class="cms-btn cms-edit-toggle{% if active %} cms-btn-active{% endif %}{% if disabled %} cms-btn-disabled{% endif %}"><span{% if extra_classes %} class="{{ extra_classes|join:' ' }}"{% endif %}></span></a>

djangocms_text_ckeditor/widgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
# this path is changed automatically whenever you run `gulp bundle`
19-
PATH_TO_JS = 'djangocms_text_ckeditor/js/dist/bundle-1c5205cc04.cms.ckeditor.min.js'
19+
PATH_TO_JS = 'djangocms_text_ckeditor/js/dist/bundle-3d3a4963e8.cms.ckeditor.min.js'
2020

2121

2222
class TextEditorWidget(forms.Textarea):

0 commit comments

Comments
 (0)