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

Re: Quick quote to Elkarte core

Reply #30

This seems to work fine for me, @ahrasis try to clean temporary files on your browser

The output I get is
Device:
@media orientationportrait
window.orientation0
@media resolution288dpi
@media device-pixel-ratio3
window.devicePixelRatio3
Widths:
@media device-width360px
screen.width360px
screen.availWidth360px
window.outerWidth360px
window.innerWidth360px
@media width360px
doc.docElem.clientWidth360px
doc.docElem.offsetWidth360px
doc.docElem.scrollWidth360px
doc.body.clientWidth360px
doc.body.offsetWidth360px
doc.body.scrollWidth360px
Heights:
@media device-height760px
screen.height760px
screen.availHeight760px
window.outerHeight681px
window.innerHeight625px
@media height625px
doc.docElem.clientHeight625px
doc.docElem.offsetHeight1305px
doc.docElem.scrollHeight1358px
doc.body.clientHeight1356px
doc.body.offsetHeight1409px
doc.body.scrollHeight1463px
P. S in the meantime I tried Smf 2.1 (when it was online, now is offline) and had the same behavior, no quick quote button was visible with Firefox for android.

Thanks for this update :thumbsup::thumbsup:

Re: Quick quote to Elkarte core

Reply #31

Ok. Now it is working but the box filled the whole screen width.

Screenshot_20220627-191308.png

Re: Quick quote to Elkarte core

Reply #32

Quote from: ahrasis – Ok. Now it is working but the box filled the whole screen width.
That was intended, but currently only works that way on mobile chrome.

With chrome it was easy to replace that default menu ribbon and IMO its a cleaner look.  With Fx I'll need another approach to do the same as it fires those events differently.  Not having the ribbon there lets me position the button outside of the text fence indicators so there is no overlap.  Downside is you can't Cut the selected text (with the menu)

 OK, the device is rendering out as a 360px wide screen, so that is narrow.  Something to do with the
media resolution at 288dpi and the media device-pixel-ratio at 3  ....  might have some control over that on with phone settings.

Re: Quick quote to Elkarte core

Reply #33

Quote from: Spuds – I've updated the script on the site so please give it a test.
Seems to be working now on my OnePlus 8 5g, great work.
Thank you,
LordRT

Re: Quick quote to Elkarte core

Reply #34

I've made a few more updates, mostly to try and clean up a few area's as well as provide a common(ish) UI across the devices.

On mobile/touch devices, the button will always appear below the text.  Only chrome allowed using the button in place of the default context menu (copy/paste/etc ribbon) The button is placed a little farther away from the text bottom to avoid interfering with the selection markers.  Firefox has some problems, in that the contextMenu and selection markers are part of the "app" they do not appear in the DOM, nor does interfacing with them update the DOM or fire events (chrome does).  So once that button is placed (Fx), that is where it is.

On desktop / Ipad and some touch, the button will generally appear where you "lift up" ... If you select left to right, the button will be on the right below the selection.  If you select right to left, it will be on the left point, below the selection.  This is more useful (and apparent) on desktop as it allows one to quickly access the button since its where you ended your selection.

Improved on keeping the button on screen with the exception of mobile/touch where it could be off the bottom of the screen if you select text at the bottom.  This is because to move it, it has to move above the default contextMenu, the size of which is dependent on various items, none of which are (cross browser) accessible, and as I said its not part of the DOM so you can't z-index your way on top.  So a minor annoyance.

Cleaned up the event listeners and some scroll jank

Re: Quick quote to Elkarte core

Reply #35

Quote from: Spuds – On mobile/touch devices, the button will always appear below the text.
Enjoying this change on my mobile device.
Thank you,
LordRT