Skip to content

Commit ad13c1e

Browse files
committed
feat: phcode-no-lp-edit class on lp element will disable lp handling for that elelent
1 parent 7460664 commit ad13c1e

6 files changed

Lines changed: 14 additions & 7 deletions

File tree

src-node/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/LiveDevelopment/BrowserScripts/LiveDevProtocolRemote.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,9 @@
492492
// Get the user's current selection
493493
const selection = window.getSelection();
494494
var element = event.target;
495+
if(element && element.classList && element.classList.contains("phcode-no-lp-edit")) {
496+
return;
497+
}
495498
if (element && element.hasAttribute('data-brackets-id')) {
496499
// Check if it's a double-click for direct editing
497500
if (event.detail === 2 && !['INPUT', 'TEXTAREA', 'SELECT'].includes(element.tagName)) {

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,9 @@ function RemoteFunctions(config = {}) {
741741
* @param {Event} event - The click event
742742
*/
743743
function handleElementClick(element, event) {
744+
if(element && element.classList && element.classList.contains("phcode-no-lp-edit")) {
745+
return;
746+
}
744747
if (!LivePreviewView.isElementInspectable(element)) {
745748
dismissUIAndCleanupState();
746749
return;
Lines changed: 4 additions & 0 deletions
Loading

src/assets/default-project/en/index.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ <h1>Phoenix Code</h1>
2626
title="Phoenix Code on YouTube"
2727
style="max-width: 320px" />
2828
</a>
29-
<svg class="play-button" viewBox="0 0 200 200" alt="Play video">
30-
<circle cx="100" cy="100" r="90" fill="#333" fill-opacity="0.6" />
31-
<polygon points="70, 55 70, 145 145, 100" fill="white" />
32-
</svg>
29+
<img src="images/play.svg" class="play-button" style="width: 64px;" alt="play">
3330
</div>
3431
</div>
3532
<img id="cloudLeftTop" alt="cloud" src="images/vector-top-left.png" />

tracking-repos.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"phoenixPro": {
3-
"commitID": "cd0d914edab122e76730b6d113663449ab0a473c"
3+
"commitID": "8446ce6fa5071ed11cfba4c353a43abe732e55f1"
44
}
55
}

0 commit comments

Comments
 (0)