Skip to content

Elm update fails when using 1Password X Chrome extension #147

@alvinlindstam

Description

@alvinlindstam

This was previously reported in elm/compiler#1735, and noted to probably be fixed in 0.19.0.

I'm running elm 0.19.0 and get that error when running https://github.com/evancz/elm-architecture-tutorial/blob/bbe9e3f76a2415734349583f562465e45c1c6f46/examples/03-form.elm with two minor modifications:

  • it's formatted with elm-format
  • I updated elm/html to 1.0.1 and elm/virtual-dom to 1.0.2

System information:
OS: Mac OS X 10.13.6
Browser: Version 70.0.3538.77 (Official Build) - current release
Interfering extension: 1Password X - Password manager, version 1.12.2 (current release). The error does not happen when the extension is deactivated.

What would be expected:
Interacting with the password fields (such as typing) should work, even when a common browser extension injected extra markup (not a simple thing, I know).

What happens:

  1. Page renders correctly
  2. I write into the name field (not a password field), no updates occur, no errors
  3. I write into the first password field, and there are no changes to the field, but the name field is filled with the last character typed when I filled that field before and the error below appears in the console
  4. I type into the second password field, and the first password field displays having a single character and the seconds is filled with the data I type but we do get another error for each input event (propable for each re-render?).

Exception:

03-form.elm:3672 Uncaught TypeError: Cannot read property 'replaceData' of undefined
    at _VirtualDom_applyPatch (03-form.elm:3672)
    at _VirtualDom_applyPatchesHelp (03-form.elm:3651)
    at _VirtualDom_applyPatches (03-form.elm:3642)
    at 03-form.elm:3897
    at 03-form.elm:3974
    at sendToApp (03-form.elm:1879)
    at HTMLInputElement.callback (03-form.elm:2950)

The compiled file:
03-form.elm.txt

As noted in the other issue, 1Password injects some markup into password fields, which for me was:

<com-1password-op-button id="com-1password-op-button" data-op-target="0" data-state="active" class="op-small" style="
        margin-left: 113px !important;
        margin-top: 3.5px !important;
        background-image: url(chrome-extension://aeblfdkhhhdcdjpifhhbdiojplfjncoa/images/icons/app_icon-light_bg-color-unlocked-12.svg) !important;
        "></com-1password-op-button>

The first password field also got the attribute data-op-id="0"

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