Posledné odpovede k Copy/Past KeePass and Firefox 94.0 (Linux Mint)https://support.mozilla.org/sk/questions/13577162021-11-21T03:28:43-08:00https://sourceforge.net/p/keepass/discussion/329221/thread/6935b089dc/ - the solution to the problem2021-11-21T03:28:43-08:00Linuxformehttps://support.mozilla.org/sk/questions/1357716#answer-1460937<p><a href="https://sourceforge.net/p/keepass/discussion/329221/thread/6935b089dc/" rel="nofollow">https://sourceforge.net/p/keepass/discussion/329221/thread/6935b089dc/</a> - the solution to the problem is here! Ths to everybody for your answers
</p>KDE or Gnome?
2021-11-16T10:10:29-08:00jonzn4SUSEhttps://support.mozilla.org/sk/questions/1357716#answer-1459787<p>KDE or Gnome?
</p>Seeing 'undefined' as the last message is normal because the code doesn't return a result.
What matt2021-11-16T05:43:12-08:00cor-elhttps://support.mozilla.org/sk/questions/1357716#answer-1459741<p>Seeing 'undefined' as the last message is normal because the code doesn't return a result.
What matters is the content of the 'found' array that holds the flavors found on the clipboard tested against the flavors defined at the start of the code.
So make sure you let KeyPass place something on the clipboard before running the JavaScript code.
You can modify the last line of the code to give some more info.
</p>
<ul><li>console.log('Global clipboard: ',found.length&gt;0?found:'&lt;nothing&gt;');
</li></ul>cor-el said
See this file to see how the clipboards works in Firefox on Linux.
https://searchfox.org2021-11-15T22:19:02-08:00Linuxformehttps://support.mozilla.org/sk/questions/1357716#answer-1459644<em><p>cor-el <a href="#answer-1459287" rel="nofollow">said</a></p></em>
<blockquote>See this file to see how the clipboards works in Firefox on Linux.
<ul><li><a href="https://searchfox.org/mozilla-release/source/widget/gtk/nsClipboard.cpp" rel="nofollow">https://searchfox.org/mozilla-release/source/widget/gtk/nsClipboard.cpp</a>
</li></ul>
You can run this code in the Browser Console to check what flavors are present on the global clipboard.
<ul><li><a href="https://developer.mozilla.org/en-US/docs/Tools/Browser_Console" rel="nofollow">https://developer.mozilla.org/en-US/docs/Tools/Browser_Console</a>
</li><li><a href="https://searchfox.org/mozilla-release/source/widget/nsITransferable.idl" rel="nofollow">https://searchfox.org/mozilla-release/source/widget/nsITransferable.idl</a>
</li></ul>
<pre>var flavors = ["text/plain","text/unicode","text/html","text/rtf"];
var images = ["image/png","image/jpeg","image/jpg","image/gif"];
var places = ["text/x-moz-place","text/x-moz-place-container","text/x-moz-place-separator","text/x-moz-place-action"];
var xmoz = ["text/x-moz-text-internal","text/x-moz-url","text/x-moz-url-data","text/x-moz-url-desc","text/x-moz-url-priv","application/x-moz-nativeimage","application/x-moz-nativehtml","application/x-moz-file"];
flavors = [flavors,images,places,xmoz];
var found = [];
var cb=Services.clipboard;
for(i in flavors){
for(j in flavors[i]){
var k = flavors[i][j];
var x = [k];
if(cb.hasDataMatchingFlavors(x,1,cb.kGlobalClipboard)){found.push(k)}
}}
console.log('Global',found);</pre><br>
</blockquote>
<p>I tried it but in the end I got "undefined"
</p>See this file to see how the clipboards works in Firefox on Linux.
https://searchfox.org/mozilla-re2021-11-14T11:04:56-08:00cor-elhttps://support.mozilla.org/sk/questions/1357716#answer-1459287<p>See this file to see how the clipboards works in Firefox on Linux.
</p>
<ul><li><a href="https://searchfox.org/mozilla-release/source/widget/gtk/nsClipboard.cpp" rel="nofollow">https://searchfox.org/mozilla-release/source/widget/gtk/nsClipboard.cpp</a>
</li></ul>
<p>You can run this code in the Browser Console to check what flavors are present on the global clipboard.
</p>
<ul><li><a href="https://developer.mozilla.org/en-US/docs/Tools/Browser_Console" rel="nofollow">https://developer.mozilla.org/en-US/docs/Tools/Browser_Console</a>
</li><li><a href="https://searchfox.org/mozilla-release/source/widget/nsITransferable.idl" rel="nofollow">https://searchfox.org/mozilla-release/source/widget/nsITransferable.idl</a>
</li></ul>
<pre>var flavors = ["text/plain","text/unicode","text/html","text/rtf"];
var images = ["image/png","image/jpeg","image/jpg","image/gif"];
var places = ["text/x-moz-place","text/x-moz-place-container","text/x-moz-place-separator","text/x-moz-place-action"];
var xmoz = ["text/x-moz-text-internal","text/x-moz-url","text/x-moz-url-data","text/x-moz-url-desc","text/x-moz-url-priv","application/x-moz-nativeimage","application/x-moz-nativehtml","application/x-moz-file"];
flavors = [flavors,images,places,xmoz];
var found = [];
var cb=Services.clipboard;
for(i in flavors){
for(j in flavors[i]){
var k = flavors[i][j];
var x = [k];
if(cb.hasDataMatchingFlavors(x,1,cb.kGlobalClipboard)){found.push(k)}
}}
console.log('Global clipboard: ',found.length&gt;0?found:'&lt;nothing&gt;');
</pre><br>jonzn4SUSE said
The browser in Safe Mode.
Try downloading another copy of Firefox and run it from t2021-11-13T23:44:41-08:00Linuxformehttps://support.mozilla.org/sk/questions/1357716#answer-1459160<em><p>jonzn4SUSE <a href="#answer-1458943" rel="nofollow">said</a></p></em>
<blockquote>The browser in Safe Mode.
Try downloading another copy of Firefox and run it from the folder. Do not sign into your Firefox account and see if you have the same issue.
<a href="https://www.mozilla.org/en-US/firefox/all/#product-desktop-release" rel="nofollow">https://www.mozilla.org/en-US/firefox/all/#product-desktop-release</a>
</blockquote>
<p>I've tried this in clean virtual machine and nothing has changed unfortunately - the same issue
</p>The browser in Safe Mode.
Try downloading another copy of Firefox and run it from the folder. Do no2021-11-13T07:13:29-08:00jonzn4SUSEhttps://support.mozilla.org/sk/questions/1357716#answer-1458943<p>The browser in Safe Mode.
</p><p>Try downloading another copy of Firefox and run it from the folder. Do not sign into your Firefox account and see if you have the same issue.
</p><p><a href="https://www.mozilla.org/en-US/firefox/all/#product-desktop-release" rel="nofollow">https://www.mozilla.org/en-US/firefox/all/#product-desktop-release</a>
</p>jonzn4SUSE said
Have you tried the same steps in Safe Mode?
Safe Mode for Linux Mint? No, I haven't2021-11-13T07:12:36-08:00Linuxformehttps://support.mozilla.org/sk/questions/1357716#answer-1458942<em><p>jonzn4SUSE <a href="#answer-1458940" rel="nofollow">said</a></p></em>
<blockquote>Have you tried the same steps in Safe Mode?
</blockquote>
<p>Safe Mode for Linux Mint? No, I haven't. But I tried with the previous version and everything works fine
</p>cor-el said
What formats (flavors) places Keypass on the clipboard ?
Note that Linux comes wit2021-11-13T07:10:03-08:00Linuxformehttps://support.mozilla.org/sk/questions/1357716#answer-1458941<em><p>cor-el <a href="#answer-1458929" rel="nofollow">said</a></p></em>
<blockquote>What formats (flavors) places Keypass on the clipboard&nbsp;?
Note that Linux comes with two clipboards, so it is possible that the wrong clipboard is used.
Does pasting with a middle-click work?
<ul><li>about:config =&gt; middlemouse.paste = true
</li></ul>
</blockquote>
<p>cntr+c or just right click on the text and from the context menu the copy command
</p><p>middle-click work with text not from keepass
</p>Have you tried the same steps in Safe Mode?
2021-11-13T07:07:59-08:00jonzn4SUSEhttps://support.mozilla.org/sk/questions/1357716#answer-1458940<p>Have you tried the same steps in Safe Mode?
</p>FredMcD said
Sometimes, when using the copy/paste;
If what you are trying to copy is formatted, the 2021-11-13T07:04:31-08:00Linuxformehttps://support.mozilla.org/sk/questions/1357716#answer-1458939<em><p>FredMcD <a href="#answer-1458920" rel="nofollow">said</a></p></em>
<blockquote>Sometimes, when using the copy/paste;
If what you are trying to copy is formatted, the information can't be
properly copied to elsewhere. What one needs to do is to copy whatever
and paste it to a 'word' type program. Then copy from word to where you want.
</blockquote>
<p>Are you sure you have read my problem carefully? I wrote that yes, when copying first to notepad, and then from notepad to the browser, there aren't any problems. But previously there was no need to use these crutches.
</p>What formats (flavors) places Keypass on the clipboard ?
Note that Linux comes with two clipboa2021-11-13T06:18:38-08:00cor-elhttps://support.mozilla.org/sk/questions/1357716#answer-1458929<p>What formats (flavors) places Keypass on the clipboard&nbsp;?
</p><p>Note that Linux comes with two clipboards, so it is possible that the wrong clipboard is used.
</p><p>Does pasting with a middle-click work?
</p>
<ul><li>about:config =&gt; middlemouse.paste = true
</li></ul>Sometimes, when using the copy/paste;
If what you are trying to copy is formatted, the information c2021-11-13T05:36:58-08:00fredmcd-hotmailhttps://support.mozilla.org/sk/questions/1357716#answer-1458920<p>Sometimes, when using the copy/paste;
If what you are trying to copy is formatted, the information can't be
properly copied to elsewhere. What one needs to do is to copy whatever
and paste it to a 'word' type program. Then copy from word to where you want.
</p>