aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/assets
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/assets')
-rw-r--r--phpBB/assets/javascript/core.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index 4a61490615..bedbd23532 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -740,6 +740,8 @@ phpbb.search.closeResults = function($input, $container) {
phpbb.search.navigateResults = function($input, $container, $resultContainer) {
// Add a namespace to the event (.phpbb.search),
// so it can be unbound specifically later on.
+ // Rebind it, to ensure the event is 'dynamic'.
+ $input.off('.phpbb.search');
$input.on('keydown.phpbb.search', function(event) {
var key = event.keyCode || event.which,
$active = $resultContainer.children('.active');
@@ -1585,7 +1587,7 @@ phpbb.colorPalette = function(dir, width, height) {
* @param {jQuery} el jQuery object for the palette container.
*/
phpbb.registerPalette = function(el) {
- var orientation = el.attr('data-color-palette'),
+ var orientation = el.attr('data-color-palette') || el.attr('data-orientation'), // data-orientation kept for backwards compat.
height = el.attr('data-height'),
width = el.attr('data-width'),
target = el.attr('data-target'),
@@ -1799,7 +1801,7 @@ $(function() {
phpbb.registerPageDropdowns();
- $('[data-color-palette]').each(function() {
+ $('[data-color-palette], [data-orientation]').each(function() {
phpbb.registerPalette($(this));
});