Skip to content

Commit

Permalink
Make an identifier for the select2 customization. Fixes #4325
Browse files Browse the repository at this point in the history
  • Loading branch information
kobizz committed May 8, 2018
1 parent 8424d03 commit 58a93c9
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
File renamed without changes.
File renamed without changes.
Expand Up @@ -2,6 +2,8 @@
* Select2 4.0.6-rc.1
* https://select2.github.io
*
* With a fix by Elementor team at line 4329
*
* Released under the MIT license
* https://github.com/select2/select2/blob/master/LICENSE.md
*/
Expand Down Expand Up @@ -4324,8 +4326,7 @@ S2.define('select2/dropdown/attachBody',[
});

$watchers.on(scrollEvent, function (ev) {
var position = Utils.GetData(this, 'select2-scroll-position');
$(this).scrollTop(position.y);
self._positionDropdown();
});

$(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions includes/editor.php
Expand Up @@ -385,8 +385,8 @@ public function enqueue_scripts() {
);

wp_register_script(
'jquery-select2',
ELEMENTOR_ASSETS_URL . 'lib/select2/js/select2.full' . $suffix . '.js',
'jquery-elementor-select2',
ELEMENTOR_ASSETS_URL . 'lib/e-select2/js/e-select2.full' . $suffix . '.js',
[
'jquery',
],
Expand Down Expand Up @@ -454,7 +454,7 @@ public function enqueue_scripts() {
'tipsy',
'imagesloaded',
'heartbeat',
'jquery-select2',
'jquery-elementor-select2',
'flatpickr',
'elementor-dialog',
'ace',
Expand Down Expand Up @@ -736,8 +736,8 @@ public function enqueue_styles() {
);

wp_register_style(
'select2',
ELEMENTOR_ASSETS_URL . 'lib/select2/css/select2' . $suffix . '.css',
'elementor-select2',
ELEMENTOR_ASSETS_URL . 'lib/e-select2/css/e-select2' . $suffix . '.css',
[],
'4.0.5'
);
Expand Down Expand Up @@ -768,7 +768,7 @@ public function enqueue_styles() {
ELEMENTOR_ASSETS_URL . 'css/editor' . $direction_suffix . $suffix . '.css',
[
'font-awesome',
'select2',
'elementor-select2',
'elementor-icons',
'wp-auth-check',
'google-font-roboto',
Expand Down
6 changes: 3 additions & 3 deletions includes/preview.php
Expand Up @@ -170,8 +170,8 @@ private function enqueue_styles() {
$direction_suffix = is_rtl() ? '-rtl' : '';

wp_register_style(
'select2',
ELEMENTOR_ASSETS_URL . 'lib/select2/css/select2' . $suffix . '.css',
'elementor-select2',
ELEMENTOR_ASSETS_URL . 'lib/e-select2/css/e-select2' . $suffix . '.css',
[],
'4.0.5'
);
Expand All @@ -180,7 +180,7 @@ private function enqueue_styles() {
'editor-preview',
ELEMENTOR_ASSETS_URL . 'css/editor-preview' . $direction_suffix . $suffix . '.css',
[
'select2',
'elementor-select2',
],
ELEMENTOR_VERSION
);
Expand Down
2 changes: 1 addition & 1 deletion tests/test-editor.php
Expand Up @@ -53,7 +53,7 @@ public function test_enqueueStyles() {

$styles = [
'font-awesome',
'select2',
'elementor-select2',
'elementor-icons',
'wp-auth-check',
'google-font-roboto',
Expand Down

1 comment on commit 58a93c9

@obe1968
Copy link

@obe1968 obe1968 commented on 58a93c9 May 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not working in Firefox Quantum 59.0.3. Cannot vouch for the other browsers like Chrome until I get home from work later this evening.

Please sign in to comment.