LastPass Chrome extension throwing error and preventing click events

I'm registering a simple click event like seen below:

$('.block--hero').on('click', '*[data-target-id]', function(e) {
    e.preventDefault();
    e.stopPropagation();
            console.log('clicked');
});

Frequently, but not always, when I click on the interface element, I'll receive the following console error that I've identified as belonging to the LastPass extension for Google Chrome.

Uncaught TypeError: Cannot read property 'location' of undefined onloadwff.js:726
    lp_docinfoFromEvent onloadwff.js:726
    icon_click_handler onloadwff.js:727
    (anonymous function) onloadwff.js:139

When I receive this error, the clicked message wasn't logged to the console. Essentially, the click event returned false.

Normally, I'd just disable the extension and forget about it, but LastPass is a pretty popular extension, and I'd like to somehow guarantee my intended behaviour. Users aren't going to know it's their extension causing the problem - only that the site doesn't work.

Is there a way around this?

Answers


I ran into this today. It seems to be related with lastpass not being able to find the username and password fields. I found this post on the last pass forms. From one of the users:

Update: I fixed this error by renaming the ids of my fields to reg_username, reg_password, login_username, and login_password.

I did this and the error has not shown itself.

Hopefully this will help someone else.


Need Your Help

Set locale to system default UTF-8

r utf-8 locale rapache

When running R inside rApache, the locale is inherited from the Apache webserver, and therefore Sys.getlocale() is always equal to "C". I would like my web application to use UTF8, so I use:

Splitting string into multiple rows in Oracle

sql string oracle plsql tokenize

I know this has been answered to some degree with PHP and MYSQL, but I was wondering if someone could teach me the simplest approach to splitting a string (comma delimited) into multiple rows in Or...