Skip to content

Commit

Permalink
fix annoying firefox paste option with clipboard #6571
Browse files Browse the repository at this point in the history
Signed-off-by: si458 <simonsmith5521@gmail.com>
  • Loading branch information
si458 committed Nov 30, 2024
1 parent c41eb72 commit da5d03b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions public/mstsc/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
self.prevClipboardText = null;
self.clipboardReadTimer = setInterval(function(){
if(navigator.clipboard.readText != null){
if (Mstsc.browser() == 'firefox') return; // this is needed because firefox pops up a PASTE option every second which is annoying
navigator.clipboard.readText()
.then(function(data){
if(data != self.prevClipboard){
Expand Down
1 change: 1 addition & 0 deletions views/default.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -9593,6 +9593,7 @@
QH('DeskLatency', latencyStr);
// Auto-clipboard
if ((((desktop.contype != 4) && (desktopsettings.autoclipboard === true)) || ((desktop.contype == 4) && (desktopsettings.rdpautoclipboard === true))) && (navigator.clipboard != null) && (navigator.clipboard.readText != null)) {
if (Mstsc.browser() == 'firefox') return; // this is needed because firefox pops up a PASTE option every second which is annoying
try {
navigator.clipboard.readText().then(function(text) {
if (desktop == null) return;
Expand Down
1 change: 1 addition & 0 deletions views/default3.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -10631,6 +10631,7 @@
QH('DeskLatency', latencyStr);
// Auto-clipboard
if ((((desktop.contype != 4) && (desktopsettings.autoclipboard === true)) || ((desktop.contype == 4) && (desktopsettings.rdpautoclipboard === true))) && (navigator.clipboard != null) && (navigator.clipboard.readText != null)) {
if (Mstsc.browser() == 'firefox') return; // this is needed because firefox pops up a PASTE option every second which is annoying
try {
navigator.clipboard.readText().then(function (text) {
if (desktop == null) return;
Expand Down

0 comments on commit da5d03b

Please sign in to comment.