Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Prevent canvas (main graph) from being selected on long press on mobile browsers (#1801)

Jordy van den Aardweg2c25e0b4680c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1684edca31..0cd3480c9a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -26,6 +26,7 @@ All notable changes to this project will be documented in this file.
- UI fix to align footer columns
- Guests can now use the favicon to toggle additional info about the site bing viewed (such as in public embeds).
- Fix SecurityError in tracking script when user has blocked all local storage
+- Prevent dashboard graph from being selected when long pressing on the graph in a mobile browser
### Changed
- Cache the tracking script for 24 hours
diff --git a/assets/js/dashboard/stats/visitor-graph.js b/assets/js/dashboard/stats/visitor-graph.js
index d6119f43e5..9a042c3e44 100644
--- a/assets/js/dashboard/stats/visitor-graph.js
+++ b/assets/js/dashboard/stats/visitor-graph.js
@@ -385,7 +385,7 @@ class LineGraph extends React.Component {
{ this.samplingNotice() }
{ this.importedNotice() }
</div>
- <canvas id="main-graph-canvas" className={'mt-4 ' + extraClass} width="1054" height="342"></canvas>
+ <canvas id="main-graph-canvas" className={'mt-4 select-none ' + extraClass} width="1054" height="342"></canvas>
</div>
</div>
)