說明:在chrome下面,編輯文章插入的圖片,點擊到圖片上面,沒有菜單顯示。javascript
報錯:java
tinymce.min.js:10 Uncaught DOMException: Failed to execute 'setBaseAndExtent' on 'Selection': There is no child at offset 1. at B.<anonymous> (https://sternerstuffdesign.com/wp/wp-includes/js/tinymce/tinymce.min.js?ver=4403-20160901:10:7658) at t.i [as fire] (https://sternerstuffdesign.com/wp/wp-includes/js/tinymce/tinymce.min.js?ver=4403-20160901:8:14427) at B.fire (https://sternerstuffdesign.com/wp/wp-includes/js/tinymce/tinymce.min.js?ver=4403-20160901:8:16322) at p.s (https://sternerstuffdesign.com/wp/wp-includes/js/tinymce/tinymce.min.js?ver=4403-20160901:10:15645) at e (https://sternerstuffdesign.com/wp/wp-includes/js/tinymce/tinymce.min.js?ver=4403-20160901:2:12478) at HTMLHtmlElement.m (https://sternerstuffdesign.com/wp/wp-includes/js/tinymce/tinymce.min.js?ver=4403-20160901:2:12818)
緣由:這個是tinymce的bug,詳情請看連接:wordpress論壇,git上面的tinymce的issuesgit
解決思路:1)chrome下面編輯文章圖片的時候,選中圖片,左右稍微拖動,菜單就會出現。(這是最直接有效的方法)github
2)下載wordpress最新版,將/wp-includes/js/tinymce下的目錄copy一份到你的wordpress項目的一樣目錄下面,進行替換chrome