[Pkg-javascript-commits] [pdf.js] 55/139: Remove any active text selection when entering Presentation Mode
David Prévot
taffit at moszumanska.debian.org
Fri Jan 9 21:18:26 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit ce62b9387d194a6f87ac884d1a96382ee32ca6cd
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Fri Nov 7 12:43:51 2014 +0100
Remove any active text selection when entering Presentation Mode
---
web/presentation_mode.js | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/web/presentation_mode.js b/web/presentation_mode.js
index 5d72e7c..0c3253b 100644
--- a/web/presentation_mode.js
+++ b/web/presentation_mode.js
@@ -150,6 +150,11 @@ var PresentationMode = {
HandTool.enterPresentationMode();
this.contextMenuOpen = false;
this.container.setAttribute('contextmenu', 'viewerContextMenu');
+
+ // Text selection is disabled in Presentation Mode, thus it's not possible
+ // for the user to deselect text that is selected (e.g. with "Select all")
+ // when entering Presentation Mode, hence we remove any active selection.
+ window.getSelection().removeAllRanges();
},
exit: function presentationModeExit() {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list