Topic: Touch doesn't seem to work in chrome dev on either the snippet or doc sites
richtera free asked 3 years ago
Expected behavior I am using the latest MDB docs inside of chrome with mobile dev enabled, but non of the touch examples actually work in there. Is this a problem of how they are deployed or do they just not work correctly with mobile development tools. When I use my code inside of my own deployment things seem normally, but it's kind of hard to copy the snippet unable to know if they work as is. Inside of my own code I usually use the JS APIs directly, but would like to migrate using the data-mdb-... or data-... auto attach in some cases, and can't tell exactly when things will and will not work and what the exact names of things are.
Actual behavior Touch APIs don't seem to work on the doc site using the mobile dev tools. I am using the latest version but the form only goes up to 4.19.2.
Resources (screenshots, code snippets etc.) Image upload seems to also be broken here. It just says "And error has occurred when I try to upload a png file" https://mdbootstrap.com/docs/standard/methods/touch/
It doesn't work in the snippet editor either https://mdbootstrap.com/snippets/standard/richtera/2829627#js-tab-view
const divPan = document.querySelector("#div-pan"); const touch4 = new mdb.Touch(divPan, 'pan');
touch4.init()
const imgPan = document.querySelector('#img-pan')
let moveElement = { x: null, y: null };
divPan.addEventListener('pan', (e) => { moveElement = { x: moveElement.x + e.movementX, y: moveElement.y + e.movementY, }
imgPan.style.transform = translate(${moveElement.x}px, ${moveElement.y}px)
})
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.19.2
- Device: Simulate mobile device
- Browser: Chrome with Mobile Dev
- OS: Mac and PC
- Provided sample code: Yes
- Provided link: Yes