jsbench-me icon indicating copy to clipboard operation
jsbench-me copied to clipboard

Unable to edit code on Firefox v93

Open ffxsam opened this issue 4 years ago • 27 comments

In Firefox, the editor is hardly usable. I can paste code, but I can't drag/select code and I can't edit by replacing highlighted code.

See video:

https://user-images.githubusercontent.com/12532733/138191998-b1e1b781-525e-4c31-8ef4-ec4a0829bb6a.mp4

ffxsam avatar Oct 21 '21 00:10 ffxsam

Seeing the same behavior, FF 93, OS X 10.14.6

NoahTheDuke avatar Oct 21 '21 18:10 NoahTheDuke

Hm, probably last version and drag&drop reorder functionality caused it. But I'm pretty sure I tested FF back then. Not using it since though. I'll check.

psiho avatar Oct 21 '21 20:10 psiho

I confirm this on FF100. Maybe you can fix this error?

Dook1 avatar May 15 '22 14:05 Dook1

my update is long overdue, but I'll push this to my urgent list and a patch release. Browser compatibility is a must. Hopefully, tomorrow night it will be released

psiho avatar May 15 '22 16:05 psiho

Thanks

Dook1 avatar May 15 '22 17:05 Dook1

Uh, was expecting a simple fix, but it seems to be a 7 year old FF bug (or a feature?): https://bugzilla.mozilla.org/show_bug.cgi?id=800050

In short, Mozzila says input fields can be either draggable or selectable, not both, while others implement it better. I'm considering some dirty hacks or maybe creating drag handlers.

Need more time, but working on this.

psiho avatar May 16 '22 23:05 psiho

I'm looking forward to it.

Dook1 avatar May 17 '22 12:05 Dook1

FF workarround is implemented so dragging is disabled when textboxes have focus.

This is on test: https://dev--jsbenchme-v1.netlify.app/ Will publish it tomorrow if no complains. Tested on Chromium, Webkit (Luakit) and FF browsers.

FF is slightly sub-optimal, because you have to click outside of the editor (to loose focus) in order to be able to drag&drop the case. Chromium and Webkit don't need this, as focus is lost before drag starts, so you can start dragging while still textbox is focused.

psiho avatar May 17 '22 13:05 psiho

That's better. But:

  1. dragging with loss of focus is not very convenient.
  2. for some reason, after dragging, there is a shift to the next line and part of the line is lost after the dragged object. Then, after entering any character, everything is restored.

Dook1 avatar May 17 '22 13:05 Dook1

for n2... I just can't reproduce it. Was dragging my a** off and no issues :) FF 99.0.1 (64-bit) on Arch. I'll try Windows machine.

for nr.1... not sure I understand exactly what you mean, but I guess it's the thing I mentioned... a need to click inside/oputside of the text area to start drag/edit, so an extra click. I'll think about ways to resolve this. Maybe handling focus onMouseOver/Out can help. I'll do what I can do without completely changing the system, but I'm not willing to go out my way to compensate something I believe is the FF bug. They should handle it. For me, it's important that JSBenchme is usable, which it wasnt on FF before.

psiho avatar May 17 '22 14:05 psiho

  1. Yes, that's right - click from the outside and only then drag. This Firefox bug is 10 years old, so it's unlikely they'll fix it in the next 100 years.
  2. I reproduce this on FF 100.0.1 Win64

Dook1 avatar May 17 '22 14:05 Dook1

While I dust off my Windows PC, here is an improvement for FF focus mentioned above. I think that extra click is gone now.

https://dev--jsbenchme-v1.netlify.app/

psiho avatar May 17 '22 20:05 psiho

Everything has become much worse than it was originally: nothing is dragged, mouse clicks do not change the cursor position.

Dook1 avatar May 17 '22 21:05 Dook1

Everything has become much worse than it was originally: nothing is dragged, mouse clicks do not change the cursor position.

Hm, something is very different with your browser or maybe something from the old versions is cached on your side, try shift+refresh. I tested this on Chrome, Webkit and FF browsers and it works. Couldnt try it on windows machine today but will try it tommorow.

psiho avatar May 17 '22 22:05 psiho

Of course I pressed Ctrl+F5, I even restarted the browser. All the same.

Dook1 avatar May 17 '22 22:05 Dook1

@Dook1, I simply can't reproduce any issues. Tried FF 95.0.2 and 100.0.1 on my Windows10 machine and no issues whatsoever on the test location (version 1.2.0-3 dev)). Any ideas how to help me reproduce this? Maybe it's some use scenario I'm not trying or something specific to your environment? Can you try it on any other browser/PC? I even tried a fewm Android mobile browsers I have.

psiho avatar May 18 '22 07:05 psiho

I tried it on my laptop - everything is the same. Just in case: I checked at this url - https://dev--jsbenchme-v1.netlify.app / . An entry appears in the console at the start of dragging: "DRAG START OK, handle detected". After releasing the mouse button, nothing happens.

Dook1 avatar May 18 '22 09:05 Dook1

And the most important problem in which apparently is the main reason: mouse clicks don't change the cursor position.

Dook1 avatar May 18 '22 09:05 Dook1

I'm still having problems too (Linux, firefox ESR 91.9) I think the only reliable fix would be to permanently remove draggable=true from all editable elements and their parents (at least in firefox) There's still plenty of draggable space on the left side of the element, anyway

12Me21 avatar May 20 '22 18:05 12Me21

I think the only reliable fix would be to permanently remove draggable=true from all editable elements and their parents (at least in firefox)

I think that's going to be a fix, at least for this patch version. Problem is, I haven't been able to reproduce this issue (on test location) on any browser/PC I tried and I tried many so I think only reliable solution is this. With 2 small(er) caveats:

  1. case name textbox will still experiance old issue (not being able to select text with the mouse). I cannot remove it from being a child of draggable element easily.
  2. When dragging, visually, instead of dragging complete test case row, only left part will be dragged.

I'm not giving up on this totally, but I want to make FF usable for now. Just need a day or two to find time for this. Busy week. Weekend at latest.

psiho avatar May 24 '22 21:05 psiho