-
Notifications
You must be signed in to change notification settings - Fork 237
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Current Behavior
When user interaction is enabled (settings.player.enableUserInteraction = true), dragging across measures creates a highlighted range. After doing this, playback becomes restricted to that selected region, even if api.isLooping is set to false (for example via a Loop on/off toggle).
The highlight is not only visual — playback actually plays the selected range and then stops after one pass.
No explicit call to set playbackRange was made in the application code.
As a result, loop-like behavior can be triggered unintentionally through drag selection.
⸻
Workaround
Disabling user interaction prevents this behavior:
settings.player.enableUserInteraction = false;
However, disabling user interaction also removes built-in click-to-seek behavior, which then requires implementing a custom click-to-seek solution. This can be a complicating process as a result.
Expected Behavior
Dragging across measures should only affect playback behavior when looping is explicitly enabled by the application (for example via a Loop toggle or when api.isLooping = true).
If looping is disabled (api.isLooping = false), drag selection should:
• Not create a visual highlight, and
• Not modify playback behavior.
Loop being off should prevent drag selection from appearing or restricting playback.
Steps To Reproduce
git clone https://github.com/louislam/its-mytabs
cd its-mytabs
git checkout dev-alphatab181
deno task setup
deno task start
1. Open http://localhost:47777
2. Load the demo tab
3. Ensure looping is disabled (api.isLooping = false)
4. Click and drag across one or more measures to create a highlight
5. Press play
Playback becomes restricted to the selected range, even though looping was not explicitly enabled.
Link to jsFiddle, CodePen, Project
No response
Version and Environment
• alphaTab version: 1.8.1
• Bundler: Webpack (confirmed), also reproducible in Vite (LouisLam repo)
• Browser: Chrome 144.0.0.0
• OS: macOS 10.15.7
• Device Pixel Ratio: 1
• Screen Resolution: 1105×851
Environment log excerpt:
AlphaTab Environment Info - V100.7
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36
Screen: 1105x851
Device Pixel Ratio: 1Platform
Web
Anything else?
- This behavior has been present for multiple versions (confirmed in 1.7.x and newer). It does not appear to be a recent regression.
- The application does not explicitly call api.playbackRange = ... when this occurs.
- After drag selection, playback becomes restricted to the selected region even when api.isLooping = false.
- Disabling user interaction (settings.player.enableUserInteraction = false) prevents the behavior, but removes built-in interaction features such as click-to-seek.
- It appears that drag selection internally sets or activates a playback range that affects playback behavior independently of api.isLooping.
console.log('after drag', {
isLooping: api.isLooping,
playbackRange: api.playbackRange,
});
After the drag highlight appears, api.playbackRange becomes non-null and remains set unless explicitly cleared.
Why enableUserInteraction=false is not a “real fix”
• Disabling user interaction prevents the issue
• But it also disables built-in seek / selection UX, forcing custom click-to-seek