Hello community,

here is the log from the commit of package rubygem-lightbox2 for 
openSUSE:Factory checked in at 2019-07-16 08:41:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-lightbox2 (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-lightbox2.new.1887 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-lightbox2"

Tue Jul 16 08:41:26 2019 rev:4 rq:715364 version:2.11.1.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-lightbox2/rubygem-lightbox2.changes      
2019-06-19 21:00:21.738086180 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-lightbox2.new.1887/rubygem-lightbox2.changes
    2019-07-16 08:41:28.551037627 +0200
@@ -1,0 +2,18 @@
+Mon Jul 15 04:49:10 UTC 2019 - Manuel Schnitzer <[email protected]>
+
+- updated to version 2.11.1.1
+
+  * Fixed LIGHTBOX2_VERSION and VERSION constants (The values were not updated 
for the last release)
+
+-------------------------------------------------------------------
+Sun Jul 14 22:22:59 UTC 2019 - Manuel Schnitzer <[email protected]>
+
+- updated to version 2.11.1
+
+  see upstream changelog: 
https://github.com/lokesh/lightbox2/releases/tag/v2.11.1
+
+  * #557 Bugfix - MaxHeight wouldn't work. Fix by @RuiBandarra
+  * #660 fix: use max[Width|Height] when fitImagesInViewport is false. Fix by 
@k-iwanishi
+  * #664 feature: Prevent Esc keypress from bubbling. Requested by @rkyoku in 
#663
+
+-------------------------------------------------------------------

Old:
----
  lightbox2-2.11.0.gem

New:
----
  lightbox2-2.11.1.1.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-lightbox2.spec ++++++
--- /var/tmp/diff_new_pack.6aX0C9/_old  2019-07-16 08:41:31.203036094 +0200
+++ /var/tmp/diff_new_pack.6aX0C9/_new  2019-07-16 08:41:31.203036094 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-lightbox2
-Version:        2.11.0
+Version:        2.11.1.1
 Release:        0
 %define mod_name lightbox2
 %define mod_full_name %{mod_name}-%{version}
@@ -49,7 +49,7 @@
 
 %install
 %gem_install \
-  --doc-files="README.md" \
+  --doc-files="CHANGELOG.md README.md" \
   -f
 
 %gem_packages

++++++ lightbox2-2.11.0.gem -> lightbox2-2.11.1.1.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    1970-01-01 01:00:00.000000000 +0100
+++ new/CHANGELOG.md    2019-07-15 06:43:26.000000000 +0200
@@ -0,0 +1,24 @@
+# Release 2.11.1.1
+
+* Fixed LIGHTBOX2_VERSION and VERSION constants (The values were not updated 
for the last release)
+
+# Release 2.11.1
+
+* Updated to upstream lightbox2 version 2.11.1 
(https://github.com/lokesh/lightbox2/releases/tag/v2.11.1)
+
+# Release 2.11.0
+
+* Updated to upstream lightbox2 version 2.11.0 
(https://github.com/lokesh/lightbox2/releases/tag/v2.11.0)
+
+# Release 2.10.0.2
+
+* Fix: Wrong version of `jquery-rails` was required within the gemspec file
+
+# Release 2.10.0.1
+
+* Fixes an issue when lightbox2 is being used in combination with turbolinks
+
+# Release 2.10.0
+
+This release provides the latest version of lightbox2 (2.10.0):
+https://lokeshdhakar.com/projects/lightbox2
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/lightbox2/rails/version.rb 
new/lib/lightbox2/rails/version.rb
--- old/lib/lightbox2/rails/version.rb  2019-04-23 08:52:28.000000000 +0200
+++ new/lib/lightbox2/rails/version.rb  2019-07-15 06:43:26.000000000 +0200
@@ -1,6 +1,6 @@
 module Lightbox2
   module Rails
-    VERSION = '2.11.0'
-    LIGHTBOX2_VERSION = '2.11.0'
+    VERSION = '2.11.1.1'
+    LIGHTBOX2_VERSION = '2.11.1'
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2019-04-23 09:33:54.000000000 +0200
+++ new/metadata        2019-07-15 06:47:31.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: lightbox2
 version: !ruby/object:Gem::Version
-  version: 2.11.0
+  version: 2.11.1.1
 platform: ruby
 authors:
 - Manuel Schnitzer
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2019-04-23 00:00:00.000000000 Z
+date: 2019-07-15 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: jquery-rails
@@ -31,6 +31,7 @@
 extensions: []
 extra_rdoc_files: []
 files:
+- CHANGELOG.md
 - README.md
 - lib/lightbox2.rb
 - lib/lightbox2/rails.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/assets/javascripts/lightbox2.js 
new/vendor/assets/javascripts/lightbox2.js
--- old/vendor/assets/javascripts/lightbox2.js  2019-04-23 08:52:28.000000000 
+0200
+++ new/vendor/assets/javascripts/lightbox2.js  2019-07-15 06:43:26.000000000 
+0200
@@ -1,5 +1,5 @@
 /*!
- * Lightbox v2.11.0
+ * Lightbox v2.11.1
  * by Lokesh Dhakar
  *
  * More info:
@@ -99,7 +99,19 @@
     }
 
     var self = this;
-    $('<div id="lightboxOverlay" class="lightboxOverlay"></div><div 
id="lightbox" class="lightbox"><div class="lb-outerContainer"><div 
class="lb-container"><img class="lb-image" 
src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="
 alt=""/><div class="lb-nav"><a class="lb-prev" aria-label="Previous image" 
href="" ></a><a class="lb-next" aria-label="Next image" href="" ></a></div><div 
class="lb-loader"><a class="lb-cancel"></a></div></div></div><div 
class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span 
class="lb-caption"></span><span class="lb-number"></span></div><div 
class="lb-closeContainer"><a 
class="lb-close"></a></div></div></div></div>').appendTo($('body'));
+
+    // The two root notes generated, #lightboxOverlay and #lightbox are given
+    // tabindex attrs so they are focusable. We attach our keyboard event
+    // listeners to these two elements, and not the document. Clicking anywhere
+    // while Lightbox is opened will keep the focus on or inside one of these
+    // two elements.
+    //
+    // We do this so we can prevent propogation of the Esc keypress when
+    // Lightbox is open. This prevents it from intefering with other components
+    // on the page below.
+    //
+    // Github issue: https://github.com/lokesh/lightbox2/issues/663
+    $('<div id="lightboxOverlay" tabindex="-1" 
class="lightboxOverlay"></div><div id="lightbox" tabindex="-1" 
class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img 
class="lb-image" 
src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="
 alt=""/><div class="lb-nav"><a class="lb-prev" aria-label="Previous image" 
href="" ></a><a class="lb-next" aria-label="Next image" href="" ></a></div><div 
class="lb-loader"><a class="lb-cancel"></a></div></div></div><div 
class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span 
class="lb-caption"></span><span class="lb-number"></span></div><div 
class="lb-closeContainer"><a 
class="lb-close"></a></div></div></div></div>').appendTo($('body'));
 
     // Cache jQuery objects
     this.$lightbox       = $('#lightbox');
@@ -323,24 +335,28 @@
         if (self.options.maxWidth && self.options.maxWidth < maxImageWidth) {
           maxImageWidth = self.options.maxWidth;
         }
-        if (self.options.maxHeight && self.options.maxHeight < maxImageWidth) {
+        if (self.options.maxHeight && self.options.maxHeight < maxImageHeight) 
{
           maxImageHeight = self.options.maxHeight;
         }
 
-        // Is the current image's width or height is greater than the 
maxImageWidth or maxImageHeight
-        // option than we need to size down while maintaining the aspect ratio.
-        if ((preloader.width > maxImageWidth) || (preloader.height > 
maxImageHeight)) {
-          if ((preloader.width / maxImageWidth) > (preloader.height / 
maxImageHeight)) {
-            imageWidth  = maxImageWidth;
-            imageHeight = parseInt(preloader.height / (preloader.width / 
imageWidth), 10);
-            $image.width(imageWidth);
-            $image.height(imageHeight);
-          } else {
-            imageHeight = maxImageHeight;
-            imageWidth = parseInt(preloader.width / (preloader.height / 
imageHeight), 10);
-            $image.width(imageWidth);
-            $image.height(imageHeight);
-          }
+      } else {
+        maxImageWidth = self.options.maxWidth || preloader.width || 
maxImageWidth;
+        maxImageHeight = self.options.maxHeight || preloader.height || 
maxImageHeight;
+      }
+
+      // Is the current image's width or height is greater than the 
maxImageWidth or maxImageHeight
+      // option than we need to size down while maintaining the aspect ratio.
+      if ((preloader.width > maxImageWidth) || (preloader.height > 
maxImageHeight)) {
+        if ((preloader.width / maxImageWidth) > (preloader.height / 
maxImageHeight)) {
+          imageWidth  = maxImageWidth;
+          imageHeight = parseInt(preloader.height / (preloader.width / 
imageWidth), 10);
+          $image.width(imageWidth);
+          $image.height(imageHeight);
+        } else {
+          imageHeight = maxImageHeight;
+          imageWidth = parseInt(preloader.width / (preloader.height / 
imageHeight), 10);
+          $image.width(imageWidth);
+          $image.height(imageHeight);
         }
       }
       self.sizeContainer($image.width(), $image.height());
@@ -383,6 +399,10 @@
       self.$lightbox.find('.lb-dataContainer').width(newWidth);
       self.$lightbox.find('.lb-prevLink').height(newHeight);
       self.$lightbox.find('.lb-nextLink').height(newHeight);
+
+      // Set focus on one of the two root nodes so keyboard events are 
captured.
+      self.$overlay.focus();
+
       self.showImage();
     }
 
@@ -489,11 +509,13 @@
   };
 
   Lightbox.prototype.enableKeyboardNav = function() {
-    $(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this));
+    this.$lightbox.on('keyup.keyboard', $.proxy(this.keyboardAction, this));
+    this.$overlay.on('keyup.keyboard', $.proxy(this.keyboardAction, this));
   };
 
   Lightbox.prototype.disableKeyboardNav = function() {
-    $(document).off('.keyboard');
+    this.$lightbox.off('.keyboard');
+    this.$overlay.off('.keyboard');
   };
 
   Lightbox.prototype.keyboardAction = function(event) {
@@ -503,6 +525,8 @@
 
     var keycode = event.keyCode;
     if (keycode === KEYCODE_ESC) {
+      // Prevent bubbling so as to not affect other components on the page.
+      event.stopPropagation();
       this.end();
     } else if (keycode === KEYCODE_LEFTARROW) {
       if (this.currentImageIndex !== 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/assets/stylesheets/lightbox2.scss 
new/vendor/assets/stylesheets/lightbox2.scss
--- old/vendor/assets/stylesheets/lightbox2.scss        2019-04-23 
08:52:28.000000000 +0200
+++ new/vendor/assets/stylesheets/lightbox2.scss        2019-07-15 
06:43:26.000000000 +0200
@@ -21,6 +21,7 @@
   text-align: center;
   line-height: 0;
   font-weight: normal;
+  outline: none;
 }
 
 .lightbox .lb-image {


Reply via email to