mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-14 10:34:06 +02:00
Fix PDF text selection locked out on touch devices (#6656)
This commit is contained in:
@@ -243,12 +243,12 @@ export function LocalEmbedPDF({
|
||||
drawBlackBoxes: false,
|
||||
}),
|
||||
|
||||
// Register pan plugin (depends on Viewport, InteractionManager)
|
||||
createPluginRegistration(PanPluginPackage, {
|
||||
defaultMode: "mobile", // Try mobile mode which might be more permissive
|
||||
}),
|
||||
// Register pan plugin (depends on Viewport, InteractionManager) - keep disabled to prevent drag panning
|
||||
createPluginRegistration(PanPluginPackage, {}),
|
||||
// Register pan plugin (depends on Viewport, InteractionManager).
|
||||
// Keep the default mode ("never"). Do NOT set defaultMode: "mobile" - the pan
|
||||
// react layer makes pan the default interaction on any touch-capable device
|
||||
// (navigator.maxTouchPoints > 0), e.g. Windows touchscreen laptops, which then
|
||||
// permanently locks the viewer in pan mode and blocks all text selection.
|
||||
createPluginRegistration(PanPluginPackage),
|
||||
|
||||
// Register zoom plugin with configuration
|
||||
createPluginRegistration(ZoomPluginPackage, {
|
||||
|
||||
@@ -300,10 +300,11 @@ export const LocalEmbedPDFWithAnnotations = forwardRef<
|
||||
selectAfterCreate: true,
|
||||
}),
|
||||
|
||||
// Register pan plugin
|
||||
createPluginRegistration(PanPluginPackage, {
|
||||
defaultMode: "mobile",
|
||||
}),
|
||||
// Register pan plugin. Keep the default mode ("never"). Do NOT set
|
||||
// defaultMode: "mobile" - it makes pan the default interaction on any
|
||||
// touch-capable device (e.g. Windows touchscreen laptops) and blocks
|
||||
// text selection.
|
||||
createPluginRegistration(PanPluginPackage),
|
||||
|
||||
// Register zoom plugin
|
||||
createPluginRegistration(ZoomPluginPackage, {
|
||||
|
||||
Reference in New Issue
Block a user