From 299831a973eb45aa11f850114d291672face9a17 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 18 Dec 2022 13:13:28 +0200 Subject: [PATCH 01/56] Update live-view.js --- live-view/live-view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-view/live-view.js b/live-view/live-view.js index 9ffb3f16db..a0a60d6c59 100644 --- a/live-view/live-view.js +++ b/live-view/live-view.js @@ -1055,7 +1055,7 @@ async function renderLiveViewHTML(file) { if (!workerClientId) await workerInstallPromise; - liveView.innerHTML = ''; + liveView.innerHTML = ''; liveFile = file; From 07e7c765d8e29b6f26a5a864f2432b4ba7f921cc Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 18 Dec 2022 13:19:02 +0200 Subject: [PATCH 02/56] Update live-view.js --- live-view/live-view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-view/live-view.js b/live-view/live-view.js index a0a60d6c59..9ea440c6d3 100644 --- a/live-view/live-view.js +++ b/live-view/live-view.js @@ -1055,7 +1055,7 @@ async function renderLiveViewHTML(file) { if (!workerClientId) await workerInstallPromise; - liveView.innerHTML = ''; + liveView.innerHTML = ''; liveFile = file; From 9f389d64c4bdc4edd9507a73a74ea4ae093c81d9 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 18 Dec 2022 13:22:44 +0200 Subject: [PATCH 03/56] Update live-view.js --- live-view/live-view.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/live-view/live-view.js b/live-view/live-view.js index 9ea440c6d3..3ad4a4c824 100644 --- a/live-view/live-view.js +++ b/live-view/live-view.js @@ -1028,9 +1028,8 @@ async function renderLiveViewHTML(file) { liveView.innerHTML = `
`; From 3f3cd892b0d52286323c9d249a1c837251f65b67 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 18 Dec 2022 13:23:49 +0200 Subject: [PATCH 04/56] Update live-view.js --- live-view/live-view.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/live-view/live-view.js b/live-view/live-view.js index 3ad4a4c824..d24c7188e5 100644 --- a/live-view/live-view.js +++ b/live-view/live-view.js @@ -1014,11 +1014,8 @@ async function handleLiveViewRequest(requestPath) { async function renderLiveViewHTML(file) { // if iOS version is lower than minimum - - const isSafariWithMac = (navigator.userAgent.toLowerCase().includes('safari') - && !navigator.userAgent.toLowerCase().includes('chrome')); - - if (isSafariWithMac) { + + if (isSafari) { const safariVersion = Number(navigator.userAgent.split('Version/')[1].split(' Safari')[0]); From 7a3ca3dd6dcb73993dea186790abaec754c2d4ba Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 18 Dec 2022 13:24:26 +0200 Subject: [PATCH 05/56] Update full.css --- full.css | 1 + 1 file changed, 1 insertion(+) diff --git a/full.css b/full.css index c077cf05fc..516849468c 100644 --- a/full.css +++ b/full.css @@ -467,6 +467,7 @@ body.notransition .live-view.file-open { width: 100%; height: 100%; background: #fff; + border: 0; max-width: unset; } From 594b659700cbcb90ba70e1b5e3e2db78f10d8795 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 18 Dec 2022 13:25:03 +0200 Subject: [PATCH 06/56] Update codeit-autolinker.js --- lib/plugins/codeit-autolinker.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/plugins/codeit-autolinker.js b/lib/plugins/codeit-autolinker.js index 4dd7b88e2f..98097c3411 100644 --- a/lib/plugins/codeit-autolinker.js +++ b/lib/plugins/codeit-autolinker.js @@ -69,14 +69,19 @@ var isMac = navigator.platform.indexOf('Mac') > -1; - env.attributes.href = href.replaceAll('\'','').replaceAll('"','').replaceAll('`',''); - env.attributes.onclick = 'if ((event.ctrlKey || event.metaKey) && event.shiftKey) { event.preventDefault(); window.open(this.href, "_blank") }'; + env.attributes.href = href; /* .replaceAll('\'','').replaceAll('"','').replaceAll('`',''); */ + + // show pointer when pressed ctrl/cmd + shift + env.attributes.onkeydown = 'if ((event.ctrlKey || event.metaKey) && event.shiftKey) { this.style.cursor = "pointer"; }'; + env.attributes.onkeyup = 'if ((event.ctrlKey || event.metaKey) && event.shiftKey) { this.style.cursor = ""; }'; + + env.attributes.onclick = 'if ((event.ctrlKey || event.metaKey) && event.shiftKey) { event.preventDefault(); window.open(this.href, "_blank") }'; env.attributes.title = isMac ? '⌘ + ⇧ + click to open link' : 'Ctrl + Shift + click to open link'; - // Silently catch any error thrown by decodeURIComponent (#1186) + // silently catch any error thrown by decodeURIComponent try { env.content = decodeURIComponent(env.content); - } catch (e) { /* noop */ } + } catch (e) {} } } }); From 8419a366b0f550e8cb8c1bccf1d5f871e4a09c8a Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 18 Dec 2022 13:25:34 +0200 Subject: [PATCH 07/56] Update codeit-autocomplete.js --- lib/plugins/codeit-autocomplete.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/plugins/codeit-autocomplete.js b/lib/plugins/codeit-autocomplete.js index 3a63208e95..1b98814eb4 100644 --- a/lib/plugins/codeit-autocomplete.js +++ b/lib/plugins/codeit-autocomplete.js @@ -231,6 +231,7 @@ acp.lang.css.init = () => { CSSProps.push('overflow'); CSSProps.push('transition'); CSSProps.push('animation'); + CSSProps.push('inset'); CSSProps.push('-webkit-user-select'); acp.lang.css.props = CSSProps; From 7707cb0f09c23b765bb1e421b0adb2e804a311ad Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 18 Dec 2022 13:26:19 +0200 Subject: [PATCH 08/56] Update codeit-autocomplete.js --- lib/plugins/codeit-autocomplete.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/plugins/codeit-autocomplete.js b/lib/plugins/codeit-autocomplete.js index 1b98814eb4..d955ce3fac 100644 --- a/lib/plugins/codeit-autocomplete.js +++ b/lib/plugins/codeit-autocomplete.js @@ -593,6 +593,10 @@ acp.utils.shouldAutocomplete = () => { if (input !== document.activeElement) return false; const cursor = input.dropper.cursor(); + + // if cursor dosen't exist, return + if (!cursor) return false; + const cursorCollapsed = cursor.collapsed; // if cursor not collapsed, return From 4a9d2b6462d630a3120bfabde70a008ceae30e9f Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Sun, 18 Dec 2022 13:41:24 +0200 Subject: [PATCH 09/56] Update live-view.js --- live-view/live-view.js | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/live-view/live-view.js b/live-view/live-view.js index d24c7188e5..d292c4691c 100644 --- a/live-view/live-view.js +++ b/live-view/live-view.js @@ -1051,7 +1051,36 @@ async function renderLiveViewHTML(file) { if (!workerClientId) await workerInstallPromise; - liveView.innerHTML = ''; + liveView.innerHTML = ` + +