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.

Tapping on map doesn't blur previous focused element

See original GitHub issue

Why event in _onDown function is preventDefault’ed? Is there any reason for that?

I’m asking, because I have troubles with touch events on mobiles and this line is actually making those troubles.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
daveraymentcommented, Oct 3, 2017

Hi. I haven’t had chance to confirm, but I think the issue may be with line 58. Instead of:

if (e.pointerType !== 'mouse' && e.pointerType !== e.MSPOINTER_TYPE_MOUSE && e.pointerType !== e.MSPOINTER_TYPE_MOUSE) {

it should be:

if (e.pointerType !== 'mouse' && e.MSPOINTER_TYPE_MOUSE && e.pointerType !== e.MSPOINTER_TYPE_MOUSE) {

As it stands, I suspect the IE11-specific code is being called for non-IE browsers.

1reaction
cherniavskiicommented, Sep 23, 2017

I found the problem - it’s right here. All pointer events, except those from TAG_WHITE_LIST, are preventDefault’ed. Before adding that white list all events were preventDefault’ed. Why do we need to preventDefault those events?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Focusing: focus/blur - The Modern JavaScript Tutorial
The focus event is called on focusing, and blur – when the element loses the focus. Let's use them for validation of an...
Read more >
Focusing on Focus Styles | CSS-Tricks
A common misconception is that the focus style can only use the outline property.
Read more >
Get "previous" element which had focus after tabbing
The following puts two listeners on each element, one for when it's blurred so that it reports itself as blurred, and one for...
Read more >
Focus and text fields - Flutter documentation
When a text field is selected and accepting input, it is said to have “focus.” Generally, users shift focus to a text field...
Read more >
Elden Ring Tips Guide: 33 Things the Game Doesn't Tell You
It will direct you to a vital in-game item that makes the rest of ... That all-important map doesn't do much good if...
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