javascript - Code behaving different on phones and tablets -


i've built page writes , reads info , firebase database. now, works , on pc, , when simulating different phones , laptops in inspector. thing on actual android or ios references seems off. still saves database in wrong places. missing?

here's line sets values in database:

    database.ref("birds/birdlist/" + [newid] + "/seene").set(checkvalue); 

and on iphone, example, line sets in: birds/birdlist "seene: true" or "seene: false" dependning on user's input.

i'm thinking might have var newid, on touchscreens clicking doesn't id passed on should, don't know how track on actual phone (in inspector can log activity, said works simulated phone on computer anyway).

function getid() { var _id = document.activeelement.id; newid = _id.substring(8); 

}

i use click event trigger functions. input appreciated!

could share snippet of code codepen or else can see? did try touchstart/touchend event mobile devices instead of click? seems trick me usually.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -