Draggable iframe stops almost immediately on iOS
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 804
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to make iframe draggable using default code from docs.
HTML
<div class="iframe-wrap draggable">
<iframe src="https://bbc.com" frameborder="0" ></iframe>
</div>
JS
const position = {x: 0, y: 0};
interact('.draggable').draggable({
listeners: {
move(event) {
position.x += event.dx;
position.y += event.dy;
event.target.style.transform = `translate(${position.x}px, ${position.y}px)`;
},
}
});
CSS
.iframe-wrap {
touch-action: none;
user-select: none;
width: 300px;
height: 300px;
overflow: hidden;
position: fixed;
z-index: 9;
}
.iframe-wrap iframe {
pointer-events: none;
height: 300px;
}
It works perfect on Android devices.
But on iOS dragging stops almost immediately.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is identified. Start by reproducing the provided HTML, JavaScript, and CSS on iOS and Android, then compare the drag behavior and trace the touch-drag entry point. Done means the iframe wrapper continues dragging on iOS as it does on Android.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100