Skip to content

www.facebook.com - The 'Guests can invite friends' checkbox cannot be checked after it has been unchecked #6214

Closed

Description

URL: www.facebook.com
Browser / Version: Firefox Mobile Nightly 55.0a1 (2017-04-25)
Operating System: Samsung Galaxy Note 4 (Android 5.0.1)
Problem type: Mobile site is not usable

Steps to Reproduce

  1. Navigate to: www.facebook.com
  2. Login with valid credentials.
  3. Tap the Hamburger button (Top-Right).
  4. Tap the Events option.
  5. Tap the Create Event button.
  6. Hide the keyboard.
  7. Uncheck then check the 'Guests can invite friends' checkbox.

Expected Behavior:
The 'Guests can invite friends' checkbox is checked.

Actual Behavior:
The 'Guests can invite friends' checkbox is not checked.

Notes:

  1. The issue is also reproducible on on Firefox 52.0 Release (Mobile).
  2. The issue is not reproducible on Chrome (Mobile) 57.0.2987.132.

Watchers:
@softvision-oana-arbuzov
@softvision-sergiulogigan

sv; country: fr

From webcompat.com with ❤️

Activity

  1. changed the title [-]www.facebook.com - mobile site is not usable[/-] [+]www.facebook.com - The 'Guests can invite friends' checkbox cannot be checked after it has been unchecked[/+] on Apr 26, 2017
  2. softvision-sergiulogigan commented on Apr 26, 2017

    @softvision-sergiulogigan
    Author

    The issue is also reproducible when selecting friends to add to a new group.

  3. MDTsai commented on Apr 27, 2017

    @MDTsai

    Confirmed, also reproducible on Firefox desktop in responsive mode. Move to needsdiagnosis

  4. added this to the needsdiagnosis milestone on Oct 30, 2017
  5. softvision-sergiulogigan commented on Dec 20, 2017

    @softvision-sergiulogigan
    Author

    The issue is still reproducible.
    Tested on Huawei P10 (Android 7.0), Firefox Nightly 59 and Chrome 63.

  6. wisniewskit commented on Jan 23, 2018

    @wisniewskit
    Member

    The problem lies in how they handle touch events in this case.

    When I tell their script that hasTouchEvents() is false (that is, there is no ontouchstart in window), or equivalently prevent their touchstart handler from being attached, then things work just fine.

    However, when hasTouchEvents() is true, the following block of code is called to set up some touch event handlers on the HTML element:

        var m = c("MTouchableSyntheticClickGK").USE_SYNTHETIC_CLICK,
            n = "touchable",
            o = 3,
            p = 160,
            q, r, s, t, u, v;
    
        function w(event) { // touchstart handler
            __p && __p();
            if (r) D(false);
            r = event.getNode(n);
            if (r.getAttribute("disabled") !== null) {
                event.prevent();
                r = null;
                return
            }
            var F = event.getRawEvent().targetTouches[0];
            s = F.target;
            B();
            q = [l.listen("touchmove", n, x), l.listen("touchend", n, y), l.listen("touchcancel", n, z)];
            t = {
                x: F.screenX,
                y: F.screenY
            };
            u = h(function() {
                r && D(true)
            }, p)
        }
    
        function x(event) { // touchmove handler
            if (r && E(event)) {
                D(false);
                A()
            }
        }
    
        function y(event) { // touchend handler
            __p && __p();
            if (r) {
                var F = !v;
                D(true);
    //            if (m && !j.get(r).nativeClick && s.getAttribute("target") != "_blank") k.click(s, event);
                C(F)
            } else {
                k.killGhostClicksNearTouch();
                C()
            }
        }
    
        function A(F) {
            clearTimeout(u);
            r && h(D.bind(null, false, r), F ? p : 0);
            v = false;
            s = r = t = null
        }
    
        function B() {
            if (q) {
                q.forEach(function(F) {
                    F.remove()
                });
                q = []
            }
        }
    
        function C(F) {
            A(F);
            B()
        }
    
        function D(F, G) {
            if (!G) v = F;
            i.conditionClass(G || r, "touched", F)
        }
    
        function E(event) {
            var F = event.getRawEvent().targetTouches[0],
                G = event.getNode("moving-box") || document.documentElement.scrollWidth > window.innerWidth;
            return Math.abs(t.y - F.screenY) >= o || G && Math.abs(t.x - F.screenX) >= o
        }
    
        if (k.hasTouchEvents()) l.listen("touchstart", n, w)
    

    Note that line I commented out in the touchend handler y. It calls K.click(), which creates a "click" MouseEvent and fires it on the input. Why? I don't know, as there will be a click event naturally fired on the input after all the touch events, since the normal sequence of events on a tap is: touchstart, touchmove, touchend, mouseover, mousemove, mousedown, mouseup, click.

    As such, they synthesize a click, then the normal one happens, and they cancel each other out. Per standards, it's a site error.

    I'm not sure why they feel the need to synthesize a click when one is already due, so they can perhaps just change their USE_SYNTHETIC_CLICK variable to false, which works. Otherwise they really should call preventDefault on the subsequent click event. That may be tricky to track, so they can alternatively just preventDefault on the touchend event, if they don't mind the browser not firing the rest of the events after touchend (all the mouse ones and click), which also works.

  7. adamopenweb commented on Apr 6, 2018

    @adamopenweb
    Collaborator

    Contacted via partner mailing list.

  8. adamopenweb commented on Apr 6, 2018

    @adamopenweb
    Collaborator

    They have passed this bug to the Mobile Web team.

  9. adamopenweb commented on Jul 18, 2018

    @adamopenweb
    Collaborator

    Pinging them today to see about an update.

  10. adamopenweb commented on Oct 31, 2018

    @adamopenweb
    Collaborator

    This has been fixed by Facebook. Thanks everyone!

  11. modified the milestones: sitewait, fixed on Oct 31, 2018
  12. lock commented on Nov 7, 2018

    @lock

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue at https://webcompat.com/issues/new if you are experiencing a similar problem.

  13. locked as resolved and limited conversation to collaborators on Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions