Copy paste only works in compose new tweet, not replies
Closed this issue · 12 comments
The code that @ReimarPB added works great but only in the main compose window. Replying to tweets does not work yet.
This problem is still happening on Firefox DE 69.0b6. In addition, ⌘-c and ⌘-v not work even in new tweet form on macOS. Would you mind reopening it?
Running document.addEventListener("keydown", e => (...))
on macOS, an input of Command key(⌘)(for copy&paste shortcut in macOS) seems to set metaKey
true instead of ctrlKey
. I show the event below:
keydown Meta
altKey: false
bubbles: true
cancelBubble: false
cancelable: true
charCode: 0
code: "KeyV"
composed: true
ctrlKey: false
currentTarget: HTMLDocument https://twitter.com/
defaultPrevented: false
detail: 0
eventPhase: 3
explicitOriginalTarget: <div class="tweet-box rich-editor is-showPlaceholder" aria-labelledby="Tweetstorm-tweet-box-0-l…-tweet-box-0-text-label" name="tweet" spellcheck="true" role="textbox" aria-multiline="true" data-placeholder-default="いまどうしてる?" data-placeholder-poll-composer-on="質問する" data-placeholder-add-another-tweet="別のツイートを追加" dir="ltr" aria-autocomplete="list" aria-expanded="false" aria-owns="typeahead-dropdown-6" contenteditable="true">
isComposing: false
isTrusted: true
key: "v"
keyCode: 86
layerX: 0
layerY: 0
location: 0
metaKey: true
originalTarget: <div class="tweet-box rich-editor is-showPlaceholder" aria-labelledby="Tweetstorm-tweet-box-0-l…-tweet-box-0-text-label" name="tweet" spellcheck="true" role="textbox" aria-multiline="true" data-placeholder-default="いまどうしてる?" data-placeholder-poll-composer-on="質問する" data-placeholder-add-another-tweet="別のツイートを追加" dir="ltr" aria-autocomplete="list" aria-expanded="false" aria-owns="typeahead-dropdown-6" contenteditable="true">
rangeOffset: 0
rangeParent: <p>
repeat: true
returnValue: true
shiftKey: false
srcElement: <div class="tweet-box rich-editor is-showPlaceholder" aria-labelledby="Tweetstorm-tweet-box-0-l…-tweet-box-0-text-label" name="tweet" spellcheck="true" role="textbox" aria-multiline="true" data-placeholder-default="いまどうしてる?" data-placeholder-poll-composer-on="質問する" data-placeholder-add-another-tweet="別のツイートを追加" dir="ltr" aria-autocomplete="list" aria-expanded="false" aria-owns="typeahead-dropdown-6" contenteditable="true">
target: <div class="tweet-box rich-editor is-showPlaceholder" aria-labelledby="Tweetstorm-tweet-box-0-l…-tweet-box-0-text-label" name="tweet" spellcheck="true" role="textbox" aria-multiline="true" data-placeholder-default="いまどうしてる?" data-placeholder-poll-composer-on="質問する" data-placeholder-add-another-tweet="別のツイートを追加" dir="ltr" aria-autocomplete="list" aria-expanded="false" aria-owns="typeahead-dropdown-6" contenteditable="true">
timeStamp: 50097
type: "keydown"
view: Window https://twitter.com/
which: 86
<get isTrusted()>: function isTrusted()
<prototype>: KeyboardEventPrototype { getModifierState: getModifierState(), initKeyboardEvent: initKeyboardEvent(), initKeyEvent: initKeyEvent(), … }
Tried fixing this in 08e849a Can you test it for me, I don't have a mac. Just download it from https://github.com/ZusorCode/GoodTwitter/archive/master.zip, unzip it then go to about:debugging and select load temporary addon. Make sure the one you installed from the store is removed. Thanks!
Hi, thanks for fix, looks like now this works (with debugging plugin version) but I observe blinking-shifting on paste. I.e. when I press ⌘-v everything shifts up (to the top of the screen) for a moment and then gets back to normal (to the top of the bottom of the Twitter menu bar, as it was before).
Also, CUT still doesn't work at all?
Also, was the Edge banner hack implemented? I'm just hiding it with uBlock, but that would be nice to have it as an option.
I'm observing the inability to copy-paste into DMs. I'm on Firefox 68.0.1.
Copying and cutting still doesn't work. I'm looking into the issue @onix mentioned where it scrolls down for a second before scrolling up again.
I have now fixed it and a pull request has been made.
I think this is now fully fixed in 8549425
Will be version 1.7 and currently pending review
I give up using this, and I found another add-on for Firefox. That addon seems to solve copy & paste problem more elegantly but It is distributed under GPL, so I only put the URL here. I apologize for my impolite claims.
https://github.com/zaszthecroc/fix-my-twitter/blob/master/content-script.js
Firefox copy/paste issue still lives in v1.7.