hannesmannerheim / qvitter

mirror. moved to https://git.gnu.io/h2p/Qvitter, send merge requests and issues there
https://git.gnu.io/h2p/Qvitter
GNU Affero General Public License v3.0
86 stars 26 forks source link

pasting with mobile firefox #284

Open hannesmannerheim opened 8 years ago

netmackan commented 8 years ago

Way to reproduce with Firefox on Android

  1. Copy som text
  2. On quitter.se click the compose a new notice link with a pen icon
  3. In the white area where text can be written, long-press so the menu with the paste button is displayed
  4. Click paste Expected: the copied text is added in the text area and can be seen Actually: no text is seen, char counter still says 140 but sometimes the pasted text can be selected as if it were there but with white color on white background.
rolfrb commented 8 years ago

I'm experiencing the same with Safari on iOS (quitter.no, iOS 9.2 - latest). Since there are no working apps for GNU Social on iOS, this bug makes it hard to share links on iPhone and iPad.

In this queet I pasted a link to this issue: https://quitter.no/notice/928300

(Also I can't move the cursor to edit a former part of the queet while I'm authoring it. In the queet above, I marked "på" hit delete and typed "on", but it didn't show while I typed nor after posting.)

hannesmannerheim commented 8 years ago

thanks for the report! i don't have access to any ios device, but when i get hold of one i'll try it and see if i can fix it

rolfrb commented 8 years ago

No problem. It was the least I could do.

I tested this on Chromium (Ubuntu Desktop) now. If I simulate iPhone 5, long press the left mouse button and choose paste, I get the same bug. If I then inspect the element, the invisible, pasted text is there - right next to the text I typed in manually. There are no span tags separating it and it's dropped in the publish - so how it can be a part of the same html element, yet behave so different is beyond me.

Another strange thing is that if I right click and choose paste from the seemingly same menu, it works fine.

Result of post and screenshot of dev tool after pasting.

hannesmannerheim commented 8 years ago

it must be some javascript event that isn't triggered, that qvitter uses to synch the syntax highlighted overlay element with the plain text element. i'll see if i can manage to simulate like that too!