Skip to main content
Topic: RTL support (Read 10825 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: RTL support

Reply #45

@emanuele  I get this alert but before the page load , before touching anything

implementationonfocus

@Spuds do you mean remove this last testing code or something else ?  ::)

Re: RTL support

Reply #46

using the last js file from @Spuds , modifying as @emanuele test , i get the same mentioned response
 I get this alert but before (or while) the page loads , before touching anything

implementationonfocus

then by touching the menu , it works normally !!

Re: RTL support

Reply #47

Okay, then if you have time, one last try: remove all the changes suggested up until now, including the one from Spuds a few posts above, and in script.js change:
Code: [Select]
('implementation' in document ? '' : 'onmouseover="grabJumpToContent(this);" ')
to:
Code: [Select]
'onmouseover="grabJumpToContent(this);" '

or alternatively, pick a topic at: http://www.elkarte.it/community/index.php (it's another domain, not here ;)) and see if it works.
Bugs creator.
Features destroyer.
Template killer.

Re: RTL support

Reply #48

I am using now the last js file uploaded by @Spuds , its the original without any changes but yours.
I just removed your latest test alert, its the only change in this file , and applied your last modification .

The menu works now ,

it just takes more time now to open after I touch it , like 4 seconds delay , i tried another healthy internet connection, but the delay still there.
I clear cache every time before testing , I am not sure about the delay , it happens once then not the other , and so on

Quote from: emanuele – or alternatively, pick a topic at: http://www.elkarte.it/community/index.php (it's another domain, not here ;)) and see if it works.

Testing on this domain worked good , no delay
Last Edit: March 19, 2017, 08:05:09 pm by sherif

Re: RTL support

Reply #49

Actually, I forgot we were talking about mobile, so the mouseover may not alwys work... maybe touchstart?
Bugs creator.
Features destroyer.
Template killer.

Re: RTL support

Reply #50

Opened the issue so it gets addressed in 1.0.10 (no eta, it will be ready when its ready :P )

Going this route a few more things.  

1) As the event is now moving earlier in the stack, is the onfocus event needed anymore? Its not needed for any desktop browsers that I can see.
2) The onbeforeactivate should be removed and just use onfocus IF that is even required anywhere.  There is zero need to support an IE only event.  I'm thinking remove both onfocus and onbeforeactivate.
3) The onmouseover event needs to be cleared once it has been fired or the select box will get jumbled up on a second hover.  This is done in the fillSelect function.
4) The grabJumpToContent should be updated to not be blocking, that was in done one of my experiments as simple callback.

Quote from: emanuele – Actually, I forgot we were talking about mobile, so the mouseover may not alwys work... maybe touchstart?
Looks like there is browsers mapping support for that event on a touch device, but still  ....  Since we have the is_touch flag in the JS anyway we could check that and set either the touchstart or onmouseover so its prim and proper, and then remove the correct event once its fired.
Code: [Select]
(is_touch ? 'touchstart' : 'onmouseover') + '="grabJumpToContent(this);"' +

Would like an iOS test with the onfocus events removed.

Re: RTL support

Reply #51

In the mean time I have a vb forum about to be replaced with this elkarte setup I am using for tests , so i guess i will revert back to last working js version by @Spuds fix, since it will act normal for mobile users , unless you have another advice for me .
If you need more iOS tests I still can help !!

Re: RTL support

Reply #52

Sounds like a (good) plan! :D
Bugs creator.
Features destroyer.
Template killer.

Re: RTL support

Reply #53

Then for the next experiment !!

Use this version of script.js and do not make any edits to messageindex.template. php, leave it just like the default.

This version one uses the single event, as well as the official touch event if its on a touch enable device mobile device.  Lets see how iOS likes that.
Last Edit: March 20, 2017, 09:22:52 pm by Spuds

Re: RTL support

Reply #54

Messed up behaviour , only one option and furthermore,
 closing menu then opening again doesn't load the rest of the options

Re: RTL support

Reply #55

I'm was not sure that touchstart was able to be used in the way I implemented it, I think I have my answer!

I've now done a proper addEventListener for the event.  I've tested this on windows, mac and android and it works fine.  Now the question is does this work on iOS (with the single event).   Attached for testing.

Re: RTL support

Reply #56

This one worked normally , everything looks good

Re: RTL support

Reply #57

Thats great to hear!  Thanks for doing all that testing :D   Now the question is do we want to slide this in to 1.0.10 ?  @emanuele‍ what do you think?

Re: RTL support

Reply #58

Well, we have already so many things... :P

One more nobody will notice. O:-)
Bugs creator.
Features destroyer.
Template killer.

Re: RTL support

Reply #59

May I ask you to kindly update script.js for this forum asap , I just happen to use my iPhone a lot following topics here