framework icon indicating copy to clipboard operation
framework copied to clipboard

Quote option not available on multi click to select entire sentence

Open orschiro opened this issue 3 years ago • 9 comments

Current Behavior

The quote option is not present when you do a multi click to select not just one word but the entire sentence.

Steps to Reproduce

  1. Go to a reply
  2. Click several times to select the entire sentence

Expected Behavior

I expect the quote option to be present

Screenshots

Video: https://drive.google.com/file/d/1wf__APRVnttZ8T1ukz4U-L-qPg-3XN4D/view?usp=drivesdk

Environment

  • Flarum version: 1.4.0
  • Website URL: https://community.sheetgo.com/d/188-cannot-delete-connection
  • PHP version: 8.1.8
  • Browser: Latest Chrome

Output of php flarum info

No response

Possible Solution

No response

Additional Context

No response

orschiro avatar Aug 15 '22 12:08 orschiro

I believe this is due to the selection technically being outside the post body, or some other strange thing.

If I remember, triple clicking on a sentence that isn't the last one of a post works fine.

davwheat avatar Aug 15 '22 13:08 davwheat

You're right!

It works on all lines but the last one.

Very strange...

On Mon, 15 Aug 2022, 15:19 David Wheatley, @.***> wrote:

I believe this is due to the selection technically being outside the post body, or some other strange thing.

If I remember, triple clicking on a sentence that isn't the last one of a post works fine.

— Reply to this email directly, view it on GitHub https://github.com/flarum/framework/issues/3603#issuecomment-1215004923, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABJXQ6JOAJ5GIWK3PW5H23VZI7VNANCNFSM56SEQNPQ . You are receiving this because you authored the thread.Message ID: @.***>

orschiro avatar Aug 16 '22 11:08 orschiro

I can't reproduce this on the discuss

Edit: See that now on Chrome

hasan-ozbey avatar Aug 24 '22 14:08 hasan-ozbey

I can.

Video: https://drive.google.com/file/d/1UzhqnM1kHDa4UeEcC3ADj5n_8QV0RcJp/view?usp=drivesdk

Test: https://discuss.flarum.org/d/31200-dev-diary-build-22/12

orschiro avatar Aug 24 '22 19:08 orschiro

alright it's a chrome issue

hasan-ozbey avatar Aug 24 '22 23:08 hasan-ozbey

To do my bit, I noticed something that might explain what is going on.

Edge: Screenshot 2022-08-25 015226

Chrome: Screenshot 2022-08-25 015300

Firefox: Screenshot 2022-08-25 015339

Do you notice something strange? Well yes, in Firefox it works 😂, but the detail is that in Chromium based browsers (Edge/Chrome) they are adding a blank space (that doesn't exist) at the end of the sentence, maybe that's the reason why it fails?

Or maybe this is just a visual rendering issue of Chromium and this I'm commenting is stupid, no idea...

iamdarkle avatar Aug 25 '22 00:08 iamdarkle

Interesting! You mean we need to report a bug against Chromium?

On Thu, 25 Aug 2022, 02:02 Darkle, @.***> wrote:

To do my bit, I noticed something that might explain what is going on.

Edge: [image: Screenshot 2022-08-25 015226] https://user-images.githubusercontent.com/15818451/186544088-d7ffdf5b-79ff-4a57-aa47-a85611ff951d.png

Chrome: [image: Screenshot 2022-08-25 015300] https://user-images.githubusercontent.com/15818451/186544095-fdb81eab-51cc-41c4-8046-9f4427034788.png

Firefox: [image: Screenshot 2022-08-25 015339] https://user-images.githubusercontent.com/15818451/186544104-970a404a-a099-43d4-aaac-0842e5860039.png

Do you notice something strange? Well yes, in Firefox it works 😂, but the detail is that in Chromium based browsers (Edge/Chrome) they are adding a blank space (that doesn't exist) at the end of the sentence, maybe that's the reason why it fails?

Or maybe this is just a visual rendering issue of Chromium and this I'm commenting is stupid, no idea...

— Reply to this email directly, view it on GitHub https://github.com/flarum/framework/issues/3603#issuecomment-1226613784, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABJXQ75M5BCBMMLNITVXATV22ZXRANCNFSM56SEQNPQ . You are receiving this because you authored the thread.Message ID: @.***>

orschiro avatar Aug 25 '22 04:08 orschiro

It turns out the selection start varies between browsers. When you select that last line on Chrome, the range gets undesired common ancestor (the entire post stream rather than the post body) where Firefox has the post body as its common ancestor. I'll take a look into it.

hasan-ozbey avatar Aug 25 '22 09:08 hasan-ozbey

Thanks so much, Hasan!

On Thu, 25 Aug 2022 at 11:30, Hasan Özbey @.***> wrote:

It turns out the selection start varies between browsers. When you select that last line on Chrome, the range gets undesired common ancestor (the entire post stream rather than the post body) where Firefox has the post body as its common ancestor. I'll take a look into it.

— Reply to this email directly, view it on GitHub https://github.com/flarum/framework/issues/3603#issuecomment-1227016578, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABJXQ5XFKCX4NL6FABCER3V244K7ANCNFSM56SEQNPQ . You are receiving this because you authored the thread.Message ID: @.***>

orschiro avatar Aug 25 '22 10:08 orschiro