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?
If you check your extensions and see a message that indicates the LastPass extension has been corrupted, it may be due to a recent version update of your web browser. To resolve this issue, you will need to uninstall your current version of the LastPass browser extension, then reinstall.
LastPass offers browser extensions for Chrome, Firefox, Edge, Internet Explorer, Safari, and Opera. They also offer compatible MacOS and Windows Desktop apps, and Android and iOS mobile apps.
[Uplifted from my comment on suggestion of Muhamed Cicak and to draw more prominence.]
Lastpass has a 'Never URLs' option on the account admin page where you can tell it to ignore a URL - useful if you want Lastpass awake but not start interfering with your forms.
To access it:
[EDIT] Additionally there is an accepted answer for page authors in a SO answer here which says to add
data-lpignore="true"
to tell lastpass to ignore it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With