Make WordPress Core

Changeset 32462


Ignore:
Timestamp:
05/08/2015 08:09:58 PM (11 years ago)
Author:
wonderboymusic
Message:

When creating an EmbedLink view, don't add a spinner - it already exists in Embed.
Use the value of wp.media.controller.Embed.sensitivity as the sensitivity value for the debounced method in EmbedLink to ensure that the spinner toggles don't stutter or overlap.

Fixes #32036.

Location:
trunk/src/wp-includes/js
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-views.js

    r32460 r32462  
    504504
    505505        // The amount of time used when debouncing the scan.
    506         sensitivity: 200,
     506        sensitivity: 400,
    507507
    508508        initialize: function(options) {
    … …  
    45344534
    45354535        initialize: function() {
    4536                 this.spinner = $('<span class="spinner" />');
    4537                 this.$el.append( this.spinner[0] );
    45384536                this.listenTo( this.model, 'change:url', this.updateoEmbed );
    45394537        },
    … …  
    45524550
    45534551                this.fetch();
    4554         }, 600 ),
     4552        }, wp.media.controller.Embed.sensitivity ),
    45554553
    45564554        fetch: function() {
  • trunk/src/wp-includes/js/media/controllers/embed.js

    r31935 r32462  
    4040
    4141        // The amount of time used when debouncing the scan.
    42         sensitivity: 200,
     42        sensitivity: 400,
    4343
    4444        initialize: function(options) {
  • trunk/src/wp-includes/js/media/views/embed/link.js

    r32460 r32462  
    1818
    1919        initialize: function() {
    20                 this.spinner = $('<span class="spinner" />');
    21                 this.$el.append( this.spinner[0] );
    2220                this.listenTo( this.model, 'change:url', this.updateoEmbed );
    2321        },
    … …  
    3634
    3735                this.fetch();
    38         }, 600 ),
     36        }, wp.media.controller.Embed.sensitivity ),
    3937
    4038        fetch: function() {
Note: See TracChangeset for help on using the changeset viewer.