From f22e1a65d2796c80bab0c33bd3c6fc0b6581b6b1 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Thu, 11 Jul 2013 18:43:18 +0000 Subject: [PATCH] Revisions: Immediately do a disabled button check on `ready()`. Solves the issue of Prev/Next buttons not being disabled on initial load, when routing to an extremity. See #24425. git-svn-id: https://develop.svn.wordpress.org/trunk@24661 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/js/revisions.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/js/revisions.js b/wp-admin/js/revisions.js index e4f4535455..ae185c68dd 100644 --- a/wp-admin/js/revisions.js +++ b/wp-admin/js/revisions.js @@ -664,10 +664,11 @@ window.wp = window.wp || {}; initialize: function() { this.$el.html( this.template() ); + this.listenTo( this.model, 'update:revisions', this.disabledButtonCheck ); }, ready: function() { - this.listenTo( this.model, 'update:revisions', this.disabledButtonCheck ); + this.disabledButtonCheck(); }, // Go to a specific modelindex, taking into account RTL mode.