Skip to main content
Topic: Quick quote to Elkarte core (Read 3771 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Quick quote to Elkarte core

Reply #15

Lookin' good!

Edit: one minor issue, in mobile view the quick quote button likes to disappear off the left of the screen.

Re: Quick quote to Elkarte core

Reply #16

One potential way to avoid that is something like this:
Code: [Select]
right: min(100vw - var(--quote_button_width), 307px);
Where 307px is the value you're already calculating, and --quote_button_width is a CSS variable you set through the quick quote script.

Re: Quick quote to Elkarte core

Reply #17

Quote from: Frenzie – one minor issue, in mobile view the quick quote button likes to disappear off the left of the screen

thanks for the report .... and darn !

I had put in protection for going off the bottom of the screen and somehow convinced myself that right / left would not be a problem, totally forgetting that there is really no gutter space on mobile. 

Re: Quick quote to Elkarte core

Reply #18

The bottom of the screen has me a bit puzzled I have to say. When would that happen?

Re: Quick quote to Elkarte core

Reply #19

I was thinking when someone selected text that was at the  bottom Untitled.jpg of the screen.  Not going to happen to often but did not want the button to be off screen (although you could still scroll to it).

Re: Quick quote to Elkarte core

Reply #20

Oh, that bottom. I thought you meant of the page, heh. :)

Re: Quick quote to Elkarte core

Reply #21

I just cleared all temporary files on Firefox for android, but still not seeing the quick quote button. Is it just me?

Re: Quick quote to Elkarte core

Reply #22

I'll look into that ... quick question, what phone is that, seems like a very narrow screen?

Re: Quick quote to Elkarte core

Reply #23

it's a xiaomi Mi A2 Lite (5,84", 1080 x 2280 px)
sorry for my bad english

Re: Quick quote to Elkarte core

Reply #24

Interesting ... I'll try to remember to look at what may be happening, specifically on my phone the buttons do not have to wrap, they fit fine on a single line and yours has better resolution than mine.

Making some progress on the quote button issue on mobile as well.

Re: Quick quote to Elkarte core

Reply #25

Got to say I'm not having much luck with android (chrome or fx) with the button.

When you do a long press + drag + release you get the standard text markers and "Copy, .... "  menu ribbon on the screen ... but the quick quote button does not show up.

If I scroll the page just a bit the button (short up/down swipe action) when complete the button suddenly appears.  That made me think it was a page refresh issue (maybe tied up in the context menu and text indicators), so I tried various ways to force a page reflow but nothing worked :/

Now even stranger is when you do the long press + drag + release, and no button appears, however if you tap where the button should be, it works!  It must be there but its invisible. 

I tried a few other ways to show hide the button, currently its done by adding and removing a class, but I tried direct inline style with no improvement.

Also to note the mouseup event does not seem to fire when the long press is used, so I had to use the touchend event.

I did fix the issue where it could position off the left side on mobile, that part was easy.

If anyone has some ideas, I'm listening:ear:

Re: Quick quote to Elkarte core

Reply #26

And on my iPad (with some local tweaks applied, not yet on the site) the button shows up as expected, but does not work LOL!

Re: Quick quote to Elkarte core

Reply #27

Some luck with using the contextmenu event ... can at least get the button to show, although its tracking for the entire selection process ... Grrr

Re: Quick quote to Elkarte core

Reply #28

I've updated the script on the site so please give it a test.

For me on my android device and my iPad it appears to be working.  Never had any issues on the desktop browsers.  S

The issues on touch devices is wrapped up in the context menu that appears when you select text.  That control does not release until its is done, at which point it collapses the text selection, which causes subsequent functions/events to see an empty selection.

Android allows us to catch a contextmenu event so our button is inside, or part of, that control which allows use to capture the text as a quote.  We also need to be in there to get the button to appear at all.

iPad, really iOS > 13.1, shut off the contextmenu event:exploding_head:so even though the quote button does show up, when you clicked on it,  remember it is outside the contextmenu, it was like clicking elsewhere on the page, the text selection collapses and quick quote saw nothing.  I moved this to an earlier event in the touch/point/click stack and that seems to allow us to grab the selected text before the built in contextmenu has time to clear it. 

If you are thinking all that sounds like a PITA, then good you do understand what I typed :P

@radu81 check if this new version works for you. 

Also on your mobile device, could you post what the output of this page is: http://output.jsbin.com/urowoh I entered your device details and pixel density in an emulator and the site layout looks good, but what you posted looks like what I get on a very narrow screen.

 

Re: Quick quote to Elkarte core

Reply #29

I tested on android 10 chrome and firefox but the [Quote Selected] box does not appear. Anyone else?