Skip to content

Commit f0f31ec

Browse files
author
Apostolos Giatsidis
committed
Moved js script
1 parent aefed79 commit f0f31ec

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

tilelayout/add-remove-tiles/AddRemoveTiles/Pages/Index.razor

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<span>
3333
@item.Title
3434
</span>
35+
@*The JS script is in the "_Host.cshtml" file*@
3536
<span onpointerdown="stopPropagation(event)">
3637
<TelerikButton Icon="close" Title="Delete tile" Class="k-flat" OnClick="@(() => Remove(item))"></TelerikButton>
3738
</span>
@@ -73,12 +74,6 @@
7374
</SplitterPanes>
7475
</TelerikSplitter>
7576

76-
<script suppress-error="BL9992">
77-
window.stopPropagation = (e) => {
78-
e.stopPropagation();
79-
}
80-
</script>
81-
8277
@code {
8378
public IEnumerable<PodcastViewModel> Podcasts { get; set; }
8479

tilelayout/add-remove-tiles/AddRemoveTiles/Pages/_Host.cshtml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,13 @@
3030
</div>
3131

3232
<script src="_framework/blazor.server.js"></script>
33+
34+
@*Necessary to avoid mix up with clickable and*@
35+
@*draggable event in HeaderTemplate*@
36+
<script>
37+
window.stopPropagation = (e) => {
38+
e.stopPropagation();
39+
}
40+
</script>
3341
</body>
3442
</html>

0 commit comments

Comments
 (0)