gnome-shell-extension-clipboard-indicator
gnome-shell-extension-clipboard-indicator copied to clipboard
Empty string in clipboard after selecting an item using keyboard
After I had upgraded Ubuntu to 19.10 the extension started acting up a little bit. Here is the precise steps to reproduce my issue.
- Select some text and copy it to clipboard
- Click on the extension icon and choose some text from the clipboard history
- Try to paste the clipboard content with Ctrl-v. This is when the bug appears. It doesn't paste anything although I can see that the item is selected from the top bar indication.
- If I select the same item again from the clipboard history again then I can paste it. Moreover if I select something else from the clipboard history it works as expected, but until I copy something new then it is acting up again.
I'm seeing the same behavior on Ubuntu 19.10.
@Tudmotu, if you're short on time, I'd be happy to look into this. I know JavaScript; but I'm not familiar with the API(s) being used. Perhaps you could point me to some relevant documentation?
I added some logging to the extension to try to track down what's happening. So far, this is what I can tell:
_onSelectionChangeis being called twice after the initial copying of text. TheselectionSourcefor both calls isGType:MetaSelectionSourceX11. The text returned fromClipboard.get_textin_refreshIndicatorfor both calls is the text that was copied.
Nov 23 14:25:21 europa gnome-shell[3020]: _onSelectionChange: selectionSource: [object instance wrapper GType:MetaSelectionSourceX11 jsobj@0x7fa4d1497a60 native@0x555f74cbf010]
Nov 23 14:25:21 europa gnome-shell[3020]: _refreshIndicator: text: foo
Nov 23 14:25:21 europa gnome-shell[3020]: _onSelectionChange: selectionSource: [object instance wrapper GType:MetaSelectionSourceX11 jsobj@0x7fa4d14d18b0 native@0x555f77a82380]
Nov 23 14:25:21 europa gnome-shell[3020]: _refreshIndicator: text: foo
- When selecting an item from the menu,
_onSelectionChangeis again called twice. This time, the firstselectionSourceisGIName:Meta.SelectionSourceMemory. The text returned fromClipboard.get_textin_refreshIndicatoris the text that was copied. However, on the second call to_onSelectionChange, theselectionSourceisGType:MetaSelectionSourceX11, and the text returned fromClipboard.get_textin_refreshIndicatoris empty.
Nov 23 14:28:48 europa gnome-shell[3020]: _onMenuItemSelectedAndMenuClose: Clipboard.set_text(CLIPBOARD_TYPE, foo)
Nov 23 14:28:48 europa gnome-shell[3020]: _onSelectionChange: selectionSource: [object instance wrapper GIName:Meta.SelectionSourceMemory jsobj@0x7fd35cb5ad90 native@0x5584246aa450]
Nov 23 14:28:48 europa gnome-shell[3020]: _refreshIndicator: text: foo
Nov 23 14:28:48 europa gnome-shell[3020]: _onSelectionChange: selectionSource: [object instance wrapper GType:MetaSelectionSourceX11 jsobj@0x7fd35cb97a90 native@0x55842541fda0]
Nov 23 14:28:48 europa gnome-shell[3020]: _refreshIndicator: text:
- When selecting an item from the menu again, there is only a single call to
_onSelectionChange, with theselectionSourcebeingGIName:Meta.SelectionSourceMemory, and the text returned fromClipboard.get_textin_refreshIndicatorbeing the correct text for that menu item.
Nov 23 14:30:46 europa gnome-shell[3020]: _onMenuItemSelectedAndMenuClose: Clipboard.set_text(CLIPBOARD_TYPE, foo)
Nov 23 14:30:46 europa gnome-shell[3020]: _onSelectionChange: selectionSource: [object instance wrapper GIName:Meta.SelectionSourceMemory jsobj@0x7fd3342ba5b0 native@0x55842651bb90]
Nov 23 14:30:46 europa gnome-shell[3020]: _refreshIndicator: text: foo
@hron, do you happen to use the extension GSConnect or something similar? I found that disabling it (and restarting Gnome) eliminates this issue.
@hron, do you happen to use the extension GSConnect or something similar? I found that disabling it (and restarting Gnome) eliminates this issue.
@justinkusz yep, I use GSConnect
GSConnect has had an update and I've been unable to reproduce this issue. Can you still reproduce it?
Nope!
Hi all,
I'm with almost the same issue. However, so far, I notice the problem happens only with Geany text editor in a fresh install Ubuntu 19.10. With Gedit, the clipboard extension works fine. Unfortunately, Geany is my default replacement for Gedit, =/.