code: function selectControlElements() {
          editor.on('click', function (e) {
            var target = e.target;
  
            // Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250
            // WebKit can't even do simple things like selecting an image
            // Needs to be the setBaseAndExtend or it will fail to select floated images
            if (/^(IMG|HR)$/.test(target.nodeName) && dom.getContentEditableParent(target) !== "false") {
              e.preventDefault();
              editor.selection.select(target);
              editor.nodeChanged();
            }
  
            if (target.nodeName == 'A' && dom.hasClass(target, 'mce-item-anchor')) {
              e.preventDefault();
              selection.select(target);
            }
          });
        }
docs: WebKit has a bug where it isn't possible to select image, hr or anchor elements
  by clicking on them so we need to fake that.