question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Firefox] preventDefaultOnInputTarget

See original GitHub issue

Bug Report

Hi,

I just built Fomantic UI from the develop branch because I was waiting on an important fix. It has just now come to my intention that Chrome works just fine with but when using Firefox, i somehow get the following error: jQuery.Deferred exception: event is not defined preventDefaultOnInputTarget

I found that the following piece of code was causing this: Source: semantic.min.js

preventDefaultOnInputTarget: function () {
    event && S(event.target).is(p.input) && (m.verbose('Preventing default check action after manual check action'), event.preventDefault())
}

Now, as you can see, something is being done to event, but it is not defined with the scope. I looked up further in the code and saw that this happens in checkbox

With release 2.7.2, there were no issues reported, so I’m assuming this is somehow related to the upcoming release.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
lubber-decommented, Mar 7, 2019

Fixed by #544 Thank you very much for catching this! I am very sorry for this and used Browserstack once again to verify it works now… twice 🙂

1reaction
lubber-decommented, Mar 7, 2019

Already fixed by #534

Read more comments on GitHub >

github_iconTop Results From Across the Web

Event.preventDefault() - Web APIs | MDN
The preventDefault() method of the Event interface tells the user agent that if the event does not get explicitly handled, its default ...
Read more >
javascript - .preventDefault() not working in on.('input', function{})
Hi do you know how to set the caret to the end (using this code) when trying to target an iframe > body...
Read more >
Browser default actions - The Modern JavaScript Tutorial
Preventing browser actions · The main way is to use the event object. There's a method event.preventDefault() . · If the handler is...
Read more >
event.preventDefault in click handler does not ... - GitHub
Firefox 51.0.1 (64-bit). Safari 10.0.2 calls the change event listener in both cases.
Read more >
SyntheticEvent - React
As of v0.14, returning false from an event handler will no longer stop event propagation. Instead, e.stopPropagation() or e.preventDefault() should be triggered ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found