Closed serpico closed 3 months ago
Where are you pasting the EAN ?
Sorry, in the OP search box see attachment
ok ! I'll be on holidays for the next few days. btw are you on the OFF Slack ? We have a #prices channel ;)
On my laptop I can't seem to reproduce :thinking: Are you on mobile ?
One solution would be to strip spaces when searching (remove any space at the start and at the end of the text)
On my laptop I can't seem to reproduce 🤔 Are you on mobile ?
I first noticed the problem when copying from a tab OFF's website on my laptop to the searchbox on OP's searchbox on the webapp on mobile ( using KDE connect's clipboard sharing feature). After this message I tried while staying on the laptop, copy from one tab with OFF's website to the next tab containing OP's webapp searchbox but the behavior was the same.
One solution would be to strip spaces when searching (remove any space at the start and at the end of the text)
If it's a quick fix to go that way ( a few lines of code ) I'd appreciate if we could give this a try and if it doesn't work we'll move on, either close the issue or keep it for reference but without plan to dig deeper until someone else report it.
Could you try on a phone ? Or on another laptop ? Or send a video ?
I can't reproduce, so it could come from your OS.. ?
here's a video entirely on a mobile phone
https://transfert.free.fr/8gpgVe1
I'll try all on a windows laptop soon and report
PS: I tried to upload the file here on github but it was > 10MB, used ffmpeg to get it down to 2.5 then there was a message about mime type...
Thanks a lot for the video !
So i did some tests, and dug inside the code
Could you try to test again in the staging environment ? https://prices.openfoodfacts.net/app/
Thank you to keep trying!!! ( I realize it's kinda trivial and related to my workflow :smile: )
All the following was done on desktop laptop.(edited)
It seems the problem comes from the "copying from OFF" part as : when I select and copy the EAN and see this ( a screenshot I took from OFF ) I'm thinking, ok only the selected/highlighted part is being copied (so there will be no space). However when I paste on a text editor the "problematic" space before the EAN is already there (as it would be if I pasted on the OP searchbox).
Is it the same behavior on your machine?
PS: I noticed a change, my screenshoter allows me to draw a zone to screenshot.
If the EAN string begins with the space it will disappear as soon as I activate the "draw" mode (but the EAN is still screenshot somehow in the resulting file).
If the EAN string is "conform" ( no space, copied "cleanly" from a text editor for example ) it doesn't disappear ( no change whether the draw mode is activated or not ).
Before it was the same in both case, space or no space, there was no "disappearance" whether the draw mode was activated or not.
With Brave + Ubuntu I can't reproduce the "copying the barcode from OFF comes with a space".
BUT with Firefox + Ubuntu I indeed have this problem :eyes:
I guess this is a Firefox issue...
Epic: #
Description
repeat steps 1 to 3 but paste into a text editor ( gedit in my case ), highlight and copy from there, product is found.
Same thing happen when you want to copy EAN from OFF page to add a new product
Looks like there's a space added in front of the EAN