Skip to content

HTML5 color selector broken on WebKit browsers #535

Open
@kanflo

Description

WebKit browsers (macOS, iOS) send onchange for every change in color selection (including eg. sliding of RGB bars). This causes remi to send an update to the color widget, eg:

<input id="133167224621328" class="color" value="#beff4c" type="color" autocomplete="off" onchange="var params{};params['value']=document.getElementById('133167224621328').value;remi.sendCallbackParam('133167224621328','onchange',params);" data-parent-widget="133167224323712" style="margin:10px;width:30px;height:30px;position:static;order:-1"></input>

which in turn closes the color selector (and interrupts color selection). Chromium browsers on the other hand do not send onchange until the user closes the color picker. I did a workaround in send_message(...):

    if 'class="color"' in from_websocket(message):
        self._log.warning("ignoring message that would close the color picker on iOS")
        return True

A better solution would be to skip the message earlier, possibly based on the client browser.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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