Skip to content

Setting a color input doesn't fire the change or input events #229

Description

@asilano

Given HTML like:

<input type="color" id="control" onchange="document.getElementById('monitor').innerHTML = 'changed'"/>
<div id="monitor"></div>

Then the following test will fail:

fill_in("control", with: "#c0ffee")
expect(page).to have_content("changed")

This is because the set method for a color input only forces the value via JavaScript; it doesn't trigger the change or input events.

I have a fix for this; PR incoming.

Activity

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

Metadata

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