discourse/app/assets/javascripts
David Battersby 351e8e2359
FIX: capture click target in lightbox click handler (#22732)
In Safari, clicking any image in a lightbox gallery results in the first image loading (instead of the clicked image).

Previously we relied on document.activeElement to determine which lightbox image was clicked. However in Chrome the active element is the lightbox selector (a.lightbox), whereas in Safari the active element defaults to the body tag.

Currently the startingIndex that is calculated within processHTML() is used by lightbox to determine which image to load first. The starting index is currently achieved by checking each lightbox element within the gallery against the active element.

To fix this issue we can use the event.target to get the clicked image, then use the closest selector and pass that into the function to do the matching and return the correct startingIndex.
2023-07-21 12:28:37 +08:00
..
admin DEV: Convert admin-incoming-email modal to component-based API (#22701) 2023-07-20 16:31:20 -05:00
bootstrap-json DEV: Improve ember-cli 'LOAD_PLUGINS' behavior (#22590) 2023-07-13 11:27:29 +01:00
confirm-new-email DEV: Add error message styling (#21225) 2023-04-25 08:40:18 -04:00
deprecation-silencer DEV: move deprecation silencer to a shared package (#22668) 2023-07-18 19:07:20 +01:00
dialog-holder Build(deps-dev): Bump webpack in /app/assets/javascripts (#22662) 2023-07-18 11:35:46 +02:00
discourse FIX: capture click target in lightbox click handler (#22732) 2023-07-21 12:28:37 +08:00
discourse-common DEV: introduce Ember <template> tag support (.gjs) (#22719) 2023-07-20 21:01:12 +01:00
discourse-hbr Build(deps-dev): Bump webpack in /app/assets/javascripts (#22662) 2023-07-18 11:35:46 +02:00
discourse-plugins DEV: introduce Ember <template> tag support (.gjs) (#22719) 2023-07-20 21:01:12 +01:00
discourse-widget-hbs Build(deps-dev): Bump webpack in /app/assets/javascripts (#22662) 2023-07-18 11:35:46 +02:00
docs
ember-addons
ember-cli-progress-ci
ember-production-deprecations DEV: Clean up package.json files (#22349) 2023-06-30 13:01:45 +02:00
locales UX/DEV: Review queue redesign fixes (#20239) 2023-03-02 16:40:53 +01:00
patches DEV: Update ember-cli to 5.0.0 (#22280) 2023-06-26 17:15:59 +02:00
pretty-text Build(deps-dev): Bump webpack in /app/assets/javascripts (#22662) 2023-07-18 11:35:46 +02:00
select-kit Build(deps-dev): Bump webpack in /app/assets/javascripts (#22662) 2023-07-18 11:35:46 +02:00
truth-helpers Build(deps-dev): Bump webpack in /app/assets/javascripts (#22662) 2023-07-18 11:35:46 +02:00
wizard DEV: Revert "DEV: Update replaceWith on Route (#22645)" (#22693) 2023-07-19 10:47:31 -05:00
.licensee.json DEV: Update sub-dependencies (#22325) 2023-06-29 17:08:33 +02:00
.npmrc
discourse-js-processor.js DEV: Update ember-cli-htmlbars to 6.2.0 (#20467) 2023-02-27 18:43:28 +01:00
handlebars-shim.js
package.json DEV: move deprecation silencer to a shared package (#22668) 2023-07-18 19:07:20 +01:00
polyfills.js Drop support for iOS < 15.7 (#19847) 2023-01-16 17:28:59 +00:00
service-worker.js.erb FIX: Attempt to reconnect to server when browser visibilty changes (#22259) 2023-06-23 11:32:34 -05:00
yarn.lock Build(deps-dev): Bump sass in /app/assets/javascripts (#22723) 2023-07-20 22:30:13 +02:00