Git Product home page Git Product logo

chatra's Issues

Chat window is not visible on mobile WebKit

Initially noticed it with this npm package, but it seems as though this is reproducible even with vanilla src method.

Demo

Recorded a quick video here.

Repro

  1. In any environment, even just in an index.html include Chatra's starting script PLUS the customWidgetButton prop so that default chat button is hidden:
<script>
    (function(d, w, c) {
        w.ChatraID = 'your_id';
        var s = d.createElement('script');
        w[c] = w[c] || function() {
            (w[c].q = w[c].q || []).push(arguments);
        };
        s.async = true;
        s.src = 'https://call.chatra.io/chatra.js';
        if (d.head) d.head.appendChild(s);
    })(document, window, 'Chatra');

    window.ChatraSetup = {
	   customWidgetButton: '.custom-chat-button'
	};
</script>

<button
	class="custom-chat-button"
	onclick="Chatra('openChat', true)"
>
	Open chat
</button>
  1. Important: open this file in a mobile WebKit browser. The function works fine if you're using the desktop viewport, but does not on mobile one. I was able to reproduce it in both iOS 16 and desktop Safari 16.4, though you can get more info from the desktop Safari console for some reason.
  2. Click on the Open chat button.

Expected

Chat window to open.

Result

Looking through the inspector, I can see that the chatra--safari gets chatra--expanded class, though visually nothing changes.

get new messages counter/tip on page load

Hi! I am working on a custom chat button inside sidebar
And looking for some api reference to check if there are some new messages appeared til last page load
Something like onNewMessage callback, just to show some visual tip for user, but on init

TypeScript Support

It's nice that you already have an npm package. Some typings for TS will be helpful. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.