Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2017-09-08 10:59:35

gerben
Member
Registered: 2016-11-30
Posts: 7

Autofocus on Page embed code makes page jump

Hi,

I embedded the Page embed code on my page at the bottom.
The input field to enter your name has an autofocus property.
Firefox jumps to that part of the page which has an autofocus so the page automatically scrolls to the bottom of the page where the chat form is.
I want my visitors to read the first part of the page first.
Is it possible to disable the autofocus?

Kind regards,
Gerben Versluis

Offline

#2 2017-09-08 12:00:19

gerben
Member
Registered: 2016-11-30
Posts: 7

Re: Autofocus on Page embed code makes page jump

As a temporary dirty workaround I wrote this jQuery script which hides the container until the iframe is loaded so the autofocus is not processed by the browser:

[== JavaScript ==]

      // prevent autofocus
      $('#lhc_status_container_page').hide();
      var chatChecker = setInterval(function() {
        var iframe = $('#lhc_status_container_page').find('iframe');
        if (iframe.length) {
          clearInterval(chatChecker);
          $(iframe).on('load.chatter', function() {
            $('#lhc_status_container_page').show();
          });
        }
      }, 100);

Offline

#3 2017-09-08 12:01:56

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 4,046
Website

Re: Autofocus on Page embed code makes page jump

Hi gerben,
thank you for your request. Can you share the link where the issue is?

I do not know if what you are asking for is possibile,
let's see the page where the issue is.
I tried to request a private chat with you but maybe you are not connected to the forum, right now smile  cool


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#4 2017-09-08 12:05:01

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 4,046
Website

Re: Autofocus on Page embed code makes page jump

Maybe gerben you need try to ask your question on a GitHub topic,
follow the link in my signature, once created the topic will be useful if you can paste the link of the GitHub topic here.

Thank you!


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#5 2017-09-08 12:30:47

gerben
Member
Registered: 2016-11-30
Posts: 7

Re: Autofocus on Page embed code makes page jump

I do not have my github account available here.

Steps to reproduce:
1. Login at https://demo.livehelperchat.com/site_admin/user/login
2. Goto Settings > Embed code > Page embed code
3. Copy the code from the textarea below "Copy the code from the text area to the page where you want your status to appear"
4. Paste the code at the bottom of a long HTML page
5. Open the page and it will automatically scroll down to focus on the Username input field

Offline

#6 2017-09-08 12:36:56

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 4,046
Website

Re: Autofocus on Page embed code makes page jump

Thank you,
I will update if I will receve update about this.

https://github.com/LiveHelperChat/liveh … ssues/1101


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#7 2017-09-21 13:16:53

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 4,046
Website

Re: Autofocus on Page embed code makes page jump

Hi,
I AM happy to alert you that a FIX has been made.
Thanks for your report.

GitHub topic resolved:
https://github.com/LiveHelperChat/liveh … ssues/1101

Patch


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#8 2017-09-22 08:29:30

gerben
Member
Registered: 2016-11-30
Posts: 7

Re: Autofocus on Page embed code makes page jump

Great. Thnx!

Offline

#9 2017-09-22 08:42:22

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 4,046
Website

Re: Autofocus on Page embed code makes page jump

You are welcome, thanks for the report!
lol


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

Board footer