Skip to content

Latest webkit uses Long for Touch.identifier, while IDL specifies Word #5

Open
@matthewbauer

Description

On my iOS device, I consistently get identifiers like 1757034706 and -1260722569, while the haskell bindings think it should be Word. This ends up making it impossible to keep track of individual touch events.

/cc @hamishmack

Touch.idl looks like this:

[
    Conditional=TOUCH_EVENTS,
    ImplementationLacksVTable
] interface Touch {
    readonly attribute long                clientX;
    readonly attribute long                clientY;
    readonly attribute long                screenX;
    readonly attribute long                screenY;
    readonly attribute long                pageX;
    readonly attribute long                pageY;
    readonly attribute EventTarget         target;
    readonly attribute unsigned long       identifier;
    readonly attribute long                webkitRadiusX;
    readonly attribute long               webkitRadiusY;
    readonly attribute unrestricted float webkitRotationAngle;
    readonly attribute unrestricted float webkitForce;
};

while GHCJS.DOM.JSFFI.Generated.Touch has this:

https://github.com/ghcjs/ghcjs-dom/blob/b8e483adef0cea66d081c1a014e87c6f99eb29fc/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/Touch.hs#L83-L88

foreign import javascript unsafe "$1[\"identifier\"]"
        js_getIdentifier :: Touch -> IO Word

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Touch.identifier Mozilla Touch.identifier documentation> 
getIdentifier :: (MonadIO m) => Touch -> m Word
getIdentifier self = liftIO (js_getIdentifier self)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions