Disable double-tap zoom in browser

Hi, the subject says it all.
Is there a way to disable double-tap zoom in the browser?
Thank you.

Have you checked about:config searching for “double”?

2 Likes

Yes I did but it does not help or I mess up with the wrong setting
There are two settings:
apz.allow_double_tap_zooming
apz.allow_zooming
The double_tap setting does not turn off the feature and the second one turns off zooming completely.
Who knows more about this?

Those are probably the extent of options available. There is one more doubletap setting, but which also didn’t do much.

1 Like

This is a good feature request / improvement. It shouldn’t be a too big effort. I think the missing piece is that embedlite doesn’t respect the preference and a toggle to browser settings. This used to be very valid back in the days when multi touch didnt exist. However, nowadays for example when navigating dynamic pages that have let’s say “next” button you every easily trigger double tap to zoom accidentally when tapping “next” button too eagerly.

7 Likes

Right now i disabled
apz_allow_double_tap_zooming
and browser doesn’t react on double tap any more.

edit: by chance i saw right now that browser still sets view to 100% if it’s currently enlarged, but NOT other way round (enlarge if view is 100%). But i consider this good.

4 Likes

That’s exactly how you do it. That said, how do you prefer it?

I think double-tab-zoom causes more headach nowadays. I think we should just disable this by default, not to remove any zooming code, and let people to know about the preference. Adding a configurable setting is a bit overkill.

1 Like

Tuning the about:config is also very helpful to speed up the browser and minimize crashs.

1 Like

Double tap would be useful, except in sailfish does not work almost 90% the times, maybe if implemented better could be really useful…

Not wanting to offend anyone of course, but unfortunately on vivaldi worked very reliably…

Any specific tips for the tuning?

Yes a lot! Please give me a little time to write down beautiful.

2 Likes

This is the file where the tweaked about:config is stored:
/home/defaultuser/.cache/org.saiilfishos/Settings/.mozilla/prefs.js
and
/home/defaultuser/.local/share/org.sailfishos/browser/.mozilla/prefs.js

@Fellfrosch I send the files as PM and will post here if someone other is interested, too. (it’s long)

2 Likes

I, for one, would be grateful.

1 Like

This is from my SFOS 4.5.0.24 and works. Not tested on 4.6 !

/home/defaultuser/.cache/org.sailfishos/Settings/.mozillla/prefs.js:

// Mozilla User Preferences

// DO NOT EDIT THIS FILE.
//
// If you make changes to this file while the application is running,
// the changes will be overwritten when the application exits.
//
// To change a preference value, you can either:
// - modify it via the UI (e.g. via about:config in the browser); or
// - set it within a user.js file in your profile.

user_pref("app.update.lastUpdateTime.search-engine-update-timer", 1722707574);
user_pref("app.update.lastUpdateTime.services-settings-poll-changes", 0);
user_pref("app.update.lastUpdateTime.user-agent-updates-timer", 0);
user_pref("app.update.lastUpdateTime.xpi-signature-verification", 0);
user_pref("apz.fling_stopped_threshold", "0.13");
user_pref("apz.touch_start_tolerance", "0.0762786");
user_pref("browser.cache.disk.capacity", 1048576);
user_pref("browser.cache.disk.filesystem_reported", 1);
user_pref("embedlite.inputItemSize", "56");
user_pref("embedlite.zoomMargin", "20");
user_pref("extensions.activeThemeID", "default-theme@mozilla.org");
user_pref("extensions.blocklist.pingCountVersion", 0);
user_pref("extensions.databaseSchema", 32);
user_pref("extensions.incognito.migrated", true);
user_pref("extensions.lastAppBuildId", "20230705053638");
user_pref("extensions.lastAppVersion", "78.15.1");
user_pref("extensions.lastPlatformVersion", "78.15.1");
user_pref("extensions.systemAddonSet", "{\"schema\":1,\"addons\":{}}");
user_pref("extensions.webextensions.uuids", "{\"default-theme@mozilla.org\":\"00ac77cf-ee44-42d4-b490-dc51219b451b\"}");
user_pref("general.useragent.updates.enabled", true);
user_pref("intl.accept_languages", "de-DE,de");
user_pref("layers.acceleration.force-enabled", true);
user_pref("layers.async-video.enabled", true);
user_pref("layers.low-precision-buffer", false);
user_pref("layers.offmainthreadcomposition.enabled", true);
user_pref("layers.offmainthreadcomposition.force-basic", false);
user_pref("layers.progressive-paint", false);
user_pref("layers.tile-height", 1080);
user_pref("layers.tile-width", 1080);
user_pref("layout.css.devPixelsPerPx", "3");
user_pref("media.gmp.storage.version.observed", 1);
user_pref("places.history.expiration.transient_current_max_pages", 112348);
user_pref("signon.importedFromSqlite", true);
user_pref("toolkit.telemetry.cachedClientID", "274ea57b-52a9-4844-b7cd-72a4a09d0692");
user_pref("ui.click_hold_context_menus.delay", 800);
user_pref("ui.textSelectBackground", "#878787");

This is from my SFOS 4.5.0.24 and works. Not tested on 4.6 !

/home/defaultuser/.local/share/org.sailfishos/browser/.mozilla/prefs.js:

// Mozilla User Preferences

// DO NOT EDIT THIS FILE.
//
// If you make changes to this file while the application is running,
// the changes will be overwritten when the application exits.
//
// To change a preference value, you can either:
// - modify it via the UI (e.g. via about:config in the browser); or
// - set it within a user.js file in your profile.

user_pref("accessibility.accesskeycausesactivation", false);
user_pref("accessibility.browsewithcaret_shortcut.enabled", false);
user_pref("accessibility.typeaheadfind", false);
user_pref("accessibility.typeaheadfind.autostart", false);
user_pref("accessibility.typeaheadfind.enablesound", false);
user_pref("accessibility.typeaheadfind.linksonly", false);
user_pref("accessibility.typeaheadfind.manual", false);
user_pref("accessibility.typeaheadfind.prefillwithselection", false);
user_pref("accessibility.warn_on_browsewithcaret", false);
user_pref("app.update.lastUpdateTime.search-engine-update-timer", 1723235814);
user_pref("app.update.lastUpdateTime.services-settings-poll-changes", 1723235934);
user_pref("app.update.lastUpdateTime.user-agent-updates-timer", 1723146769);
user_pref("app.update.lastUpdateTime.xpi-signature-verification", 1723236054);
user_pref("apz.allow_double_tap_zooming", false);
user_pref("apz.autoscroll.enabled", false);
user_pref("apz.content_response_timeout", 150);
user_pref("apz.disable_for_scroll_linked_effects", true);
user_pref("apz.drag.enabled", false);
user_pref("apz.drag.initial.enabled", false);
user_pref("apz.drag.touch.enabled", false);
user_pref("apz.enlarge_displayport_when_clipped", false);
user_pref("apz.fling_accel_base_mult", "1.125");
user_pref("apz.fling_stopped_threshold", "0.13");
user_pref("apz.min_skate_speed", "1.0");
user_pref("apz.one_touch_pinch.enabled", false);
user_pref("apz.touch_start_tolerance", "0.077");
user_pref("apz.zoom-to-focused-input.enabled", false);
user_pref("apz.zoom_animation_duration_ms", 50);
user_pref("beacon.enabled", false);
user_pref("browser.autofocus", false);
user_pref("browser.cache.disk.amount_written", 20671);
user_pref("browser.cache.disk.capacity", 1048576);
user_pref("browser.cache.disk.enable", false);
user_pref("browser.cache.disk.filesystem_reported", 1);
user_pref("browser.cache.frecency_half_life_hours", 0);
user_pref("browser.cache.max_shutdown_io_lag", 0);
user_pref("browser.cache.memory.capacity", 2048);
user_pref("browser.cache.memory.enable", false);
user_pref("browser.cache.offline.enable", false);
user_pref("browser.cache.offline.storage.enable", false);
user_pref("browser.display.permit_backplate", false);
user_pref("browser.download.dir", "/run/media/defaultuser/9C33-6BBD/Download");
user_pref("browser.download.folderList", 2);
user_pref("browser.download.useDownloadDir", true);
user_pref("browser.download.useJSTransfer", true);
user_pref("browser.safebrowsing.downloads.remote.url", "");
user_pref("browser.search.defaultenginename", "Swisscows");
user_pref("browser.triple_click_selects_paragraph", false);
user_pref("device.sensors.enabled", false);
user_pref("device.sensors.motion.enabled", false);
user_pref("dom.gamepad.enabled", false);
user_pref("dom.gamepad.extensions.enabled", false);
user_pref("dom.gamepad.haptic_feedback.enabled", false);
user_pref("dom.placeholder.show_on_focus", false);
user_pref("dom.vibrator.enabled", false);
user_pref("dom.vr.oculus.invisible.enabled", false);
user_pref("dom.vr.poseprediction.enabled", false);
user_pref("dom.vr.require-gesture", false);
user_pref("embedlite.compositor.external_gl_context", true);
user_pref("embedlite.inputItemSize", "50");
user_pref("embedlite.zoomMargin", "20");
user_pref("extensions.activeThemeID", "default-theme@mozilla.org");
user_pref("extensions.blocklist.pingCountVersion", 0);
user_pref("extensions.databaseSchema", 32);
user_pref("extensions.experiments.enabled", false);
user_pref("extensions.getAddons.databaseSchema", 6);
user_pref("extensions.incognito.migrated", true);
user_pref("extensions.lastAppBuildId", "20230705053638");
user_pref("extensions.lastAppVersion", "78.15.1");
user_pref("extensions.lastPlatformVersion", "78.15.1");
user_pref("extensions.systemAddonSet", "{\"schema\":1,\"addons\":{}}");
user_pref("extensions.webextensions.uuids", "{\"default-theme@mozilla.org\":\"5958f291-61e4-4d24-9106-387d4b815c48\"}");
user_pref("general.smoothScroll", false);
user_pref("general.smoothScroll.lines", false);
user_pref("general.smoothScroll.mouseWheel", false);
user_pref("general.smoothScroll.other", false);
user_pref("general.smoothScroll.pages", false);
user_pref("general.smoothScroll.pixels", false);
user_pref("general.smoothScroll.scrollbars", false);
user_pref("general.useragent.updates.enabled", true);
user_pref("general.useragent.updates.interval", 172800);
user_pref("general.useragent.updates.lastupdated", "1723146770757");
user_pref("general.useragent.updates.retry", 86400);
user_pref("general.useragent.updates.url", "https://browser.sailfishos.org/gecko/78.0/ua-update.json");
user_pref("geo.enabled", false);
user_pref("geo.provider.network.url", "");
user_pref("geo.wifi.scan", false);
user_pref("gfx.compositor.clear-context", false);
user_pref("gfx.compositor.external-window", true);
user_pref("idle.lastDailyNotification", 1723187604);
user_pref("intl.accept_languages", "de-DE,de");
user_pref("intl.locale.requested", "");
user_pref("keyword.enabled", true);
user_pref("layers.acceleration.force-enabled", true);
user_pref("layers.async-video.enabled", true);
user_pref("layers.offmainthreadcomposition.enabled", true);
user_pref("layers.offmainthreadcomposition.force-basic", false);
user_pref("layers.tile-height", 1080);
user_pref("layers.tile-width", 1080);
user_pref("layout.css.devPixelsPerPx", "3");
user_pref("media.resource_handler_disabled", true);
user_pref("places.database.lastMaintenance", 1722609579);
user_pref("places.history.expiration.transient_current_max_pages", 112348);
user_pref("privacy.purge_trackers.date_in_cookie_database", "0");
user_pref("services.settings.clock_skew_seconds", 1);
user_pref("services.settings.last_etag", "\"1723230778612\"");
user_pref("services.settings.last_update_seconds", 1723235934);
user_pref("services.settings.main.anti-tracking-url-decoration.last_check", 1723235934);
user_pref("services.settings.main.hijack-blocklists.last_check", 1723235934);
user_pref("services.settings.main.url-classifier-skip-urls.last_check", 1723235934);
user_pref("signon.importedFromSqlite", true);
user_pref("storage.vacuum.last.index", 1);
user_pref("storage.vacuum.last.places.sqlite", 1721830360);
user_pref("toolkit.telemetry.cachedClientID", "58981174-d26e-413b-bf95-1e56bc7c2bb4");
user_pref("ui.click_hold_context_menus.delay", 300);
user_pref("ui.textSelectBackground", "#878787");

@admin : Why do 2 Backticks ` no more format text as code?

edit: gracias @attah

They never did. It takes 3.

1 Like

That time when the admin ping gets to attah:))

1 Like

So, not sure what this code does.
Is it the code to stop the double-tap zoom or is it code to minimize crashes?

The setting to stop double-tap zoom is:
apz.allow_double_tap_zooming → off

the whole collection of my about:config tweaks in fact made my browser faster and reduced crashes, but I found them more by trial and error and out of feeling than by real knowledge.