diff --git a/draftlogs/8014_change.md b/draftlogs/8014_change.md new file mode 100644 index 00000000000..5f8544772d5 --- /dev/null +++ b/draftlogs/8014_change.md @@ -0,0 +1 @@ +- Increase default double-click delay threshold to 500ms (from 300) [[#8014](https://github.com/plotly/plotly.js/pull/8014)] diff --git a/src/plot_api/plot_config.js b/src/plot_api/plot_config.js index 7eacbff31e3..abbb689b673 100644 --- a/src/plot_api/plot_config.js +++ b/src/plot_api/plot_config.js @@ -181,7 +181,7 @@ var configAttributes = { }, doubleClickDelay: { valType: 'number', - dflt: 300, + dflt: 500, min: 0, description: [ 'Sets the delay for registering a double-click in ms.', diff --git a/src/types/generated/schema.d.ts b/src/types/generated/schema.d.ts index e7db128dd25..f1d8a0d0f72 100644 --- a/src/types/generated/schema.d.ts +++ b/src/types/generated/schema.d.ts @@ -16573,7 +16573,7 @@ export interface ConfigBase { doubleClick?: false | 'reset' | 'autosize' | 'reset+autosize'; /** * Sets the delay for registering a double-click in ms. This is the time interval (in ms) between first mousedown and 2nd mouseup to constitute a double-click. This setting propagates to all on-subplot double clicks (except for geo and map) and on-legend double clicks. - * @default 300 + * @default 500 * Minimum: 0 */ doubleClickDelay?: number; diff --git a/test/jasmine/tests/dragelement_test.js b/test/jasmine/tests/dragelement_test.js index 350c64feca1..9f1252e74cc 100644 --- a/test/jasmine/tests/dragelement_test.js +++ b/test/jasmine/tests/dragelement_test.js @@ -20,7 +20,7 @@ describe('dragElement', function() { _hoverlayer: d3Select(this.hoverlayer) }; this.gd._context = { - doubleClickDelay: 300 + doubleClickDelay: 500 }; this.element.innerHTML = 'drag element'; diff --git a/test/plot-schema.json b/test/plot-schema.json index 66c0bd82c0e..9988325f9ab 100644 --- a/test/plot-schema.json +++ b/test/plot-schema.json @@ -142,7 +142,7 @@ }, "doubleClickDelay": { "description": "Sets the delay for registering a double-click in ms. This is the time interval (in ms) between first mousedown and 2nd mouseup to constitute a double-click. This setting propagates to all on-subplot double clicks (except for geo and map) and on-legend double clicks.", - "dflt": 300, + "dflt": 500, "min": 0, "valType": "number" },