Only change the default width for off canvas when we have a width in local storage

Created on 17 April 2021, over 3 years ago
Updated 11 February 2024, 7 months ago

Problem/Motivation

The JavaScript in gin_lb_offcanvas.js tries to remember any changes when dragging the off_canvas dialog. This is a very nice feature. Unfortunately, when local storage doesn't have a value, a default width of 450px is used. This breaks any default widths set in the dialog options from code, without any possiblity to change the 450px.

Proposed resolution

We can do 2 things:

  1. Allow changing the 450px default.
  2. Skip updating the options for links when Drupal.behaviors.offCanvas.width is null.

I think option 2 is probably easiest (and best).

Remaining tasks

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇳🇱Netherlands seanB Netherlands

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024