Skip to content

Commit be702a2

Browse files
committed
Fixed mobile bugs
1 parent 95df645 commit be702a2

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/views/editor/CodeEditorPart.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,16 @@ export default class CodeEditorPart extends JDOMComponent {
4747
super({
4848
shadowed: false
4949
});
50+
51+
52+
const userAgent = window.navigator.userAgent.toLowerCase()
53+
if ((userAgent.includes('iphone') || userAgent.includes('ipad')) && userAgent.includes('safari')) {
54+
this.codeEditor.textAreaElement.style.opacity = '1'
55+
}
5056
}
5157

5258
detach() {
59+
this.selected.removeListener(this.selectListener)
5360
if (this.timer !== null) {
5461
clearInterval(this.timer)
5562
}
@@ -145,14 +152,9 @@ export default class CodeEditorPart extends JDOMComponent {
145152
})
146153

147154
this.codeEditor.autoCompleteHandler.importScripts.push(...importHelper)
148-
console.log('ÖÖÖÖÖ', this.codeEditor.autoCompleteHandler.importScripts)
149155
}
150156
}
151157

152-
dettach() {
153-
this.selected.removeListener(this.selectListener)
154-
}
155-
156158
render() {
157159
const element = document.createElement('div')
158160
this.codeEditor.parentElement = element

src/views/editor/EditorView.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ export default class EditorView extends JDOMComponent.unshadowed {
443443
grid-template-columns: auto 25%;
444444
grid-gap: 10px;
445445
padding: 0 10px 10px;
446+
overflow: hidden;
446447
447448
.editor-code-editor-area {
448449
color: #FFF;

0 commit comments

Comments
 (0)