Show a cursor pointer when mouse in on link or img (#834)

* style opti

* fix #825 export wrong pdf

* show cursor pointer when mouse is on link or img and CmdOrCtrl is pressed

* revert the first commit
This commit is contained in:
Ran Luo 2019-03-30 05:20:06 +08:00 committed by Felix Häusler
parent 4c3da0c298
commit 1448ded9f9
2 changed files with 9 additions and 4 deletions

View File

@ -263,10 +263,6 @@ table {
margin-top: 0;
}
#ag-editor-id a:not(.ag-front-icon) {
pointer-events: none;
}
li > h1,
li > h2,
li > h3,
@ -719,3 +715,8 @@ span.ag-reference-link {
.ag-paragraph.ag-active .ag-front-icon {
display: block;
}
.ag-meta-or-ctrl img,
.ag-meta-or-ctrl a.ag-inline-rule {
cursor: pointer !important;
}

View File

@ -72,6 +72,9 @@ class Keyboard {
const { container, eventCenter, contentState } = this.muya
const handler = event => {
if (event.metaKey || event.ctrlKey) {
container.classList.add('ag-meta-or-ctrl')
}
if (
this.shownFloat.size > 0 &&
(
@ -152,6 +155,7 @@ class Keyboard {
keyupBinding () {
const { container, eventCenter, contentState } = this.muya
const handler = event => {
container.classList.remove('ag-meta-or-ctrl')
// check if edit emoji
const node = selection.getSelectionStart()
const paragraph = findNearestParagraph(node)