Hi,
I'm experiencing some issues when implementing the full screen edit mode for editors when more than one editor appears on the page.
I have followed the example on this page: https://docs.telerik.com/kendo-ui/controls/editors/editor/how-to/appearance/show-editor-in-full-screen
and it works well when there is only one editor.
When there are multiple editors, the full screen edit mode always displays the content of the last editor on the page.
Here is an example of the behaviour using the code from the link above and simply creating another editor:
<!DOCTYPE html>
<
html
>
<
head
>
<
meta
charset
=
"utf-8"
/>
<
title
>Kendo UI Snippet</
title
>
<
link
rel
=
"stylesheet"
href
=
"https://kendo.cdn.telerik.com/2020.2.513/styles/kendo.default-v2.min.css"
/>
<
script
src
=
"https://code.jquery.com/jquery-1.12.4.min.js"
></
script
>
<
script
src
=
"https://kendo.cdn.telerik.com/2020.2.513/js/kendo.all.min.js"
></
script
>
</
head
>
<
body
>
<
textarea
class
=
"editor"
id
=
"editor1"
></
textarea
>
<
textarea
class
=
"editor"
id
=
"editor2"
></
textarea
>
<
style
>
@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution: .001dpcm) {
.selector:not(*:root), .k-fullscreen .k-editor .k-editable-area {
height: auto;
}
.selector:not(*:root), .k-fullscreen .k-editor .k-editor-toolbar-wrap {
height: 35px;
}
}
.k-fullscreen .k-editor {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100% !important;
}
</
style
>
<
script
>
var classHolder = $(document.documentElement);
var fullscreenChange = "webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange";
$(document).bind(fullscreenChange, $.proxy(classHolder.toggleClass, classHolder, "k-fullscreen"));
function toggleFullScreen() {
var docEl = document.documentElement;
var fullscreenElement =
document.fullscreenElement ||
document.mozFullScreenElement ||
document.webkitFullscreenElement ||
document.msFullscreenElement;
var requestFullScreen = docEl.requestFullscreen ||
docEl.msRequestFullscreen ||
docEl.mozRequestFullScreen ||
docEl.webkitRequestFullscreen;
var exitFullScreen = document.exitFullscreen ||
document.msExitFullscreen ||
document.mozCancelFullScreen ||
document.webkitExitFullscreen;
if (!requestFullScreen) {
return;
}
if (!fullscreenElement) {
requestFullScreen.call(docEl, Element.ALLOW_KEYBOARD_INPUT);
} else {
exitFullScreen.call(document);
}
}
$(".editor").kendoEditor({
tools: [
{
name: "fullscreen",
template:
'<
a
class
=
"k-button"
onclick
=
"toggleFullScreen()"
>' +
'<
span
class
=
"k-icon k-i-maximize k-tool-icon"
/> Toggle fullscreen' +
'</
a
>'
}
]
});
</
script
>
</
body
>
</
html
>