mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-04 01:00:04 +00:00
Quicktags: don't call the callback on pressing the access key when a button is not visible, see #21460
git-svn-id: https://develop.svn.wordpress.org/trunk@21418 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -182,7 +182,11 @@ function edButton(id, display, tagStart, tagEnd, access, open) {
|
||||
// listen for click events
|
||||
onclick = function(e) {
|
||||
e = e || window.event;
|
||||
var target = e.target || e.srcElement, i;
|
||||
var target = e.target || e.srcElement, visible = target.clientWidth || target.offsetWidth, i;
|
||||
|
||||
// don't call the callback on pressing the accesskey when the button is not visible
|
||||
if ( !visible )
|
||||
return;
|
||||
|
||||
// as long as it has the class ed_button, execute the callback
|
||||
if ( / ed_button /.test(' ' + target.className + ' ') ) {
|
||||
|
||||
Reference in New Issue
Block a user