mirror of
https://github.com/flarum/core.git
synced 2025-07-28 20:20:34 +02:00
Don't show quote button until after selection has been made
This commit is contained in:
@@ -311,8 +311,6 @@ System.register('flarum/mentions/addComposerAutocomplete', ['flarum/extend', 'fl
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
setters: [function (_flarumExtend) {
|
setters: [function (_flarumExtend) {
|
||||||
/*global getCaretCoordinates*/
|
|
||||||
|
|
||||||
extend = _flarumExtend.extend;
|
extend = _flarumExtend.extend;
|
||||||
}, function (_flarumComponentsComposerBody) {
|
}, function (_flarumComponentsComposerBody) {
|
||||||
ComposerBody = _flarumComponentsComposerBody.default;
|
ComposerBody = _flarumComponentsComposerBody.default;
|
||||||
@@ -681,7 +679,10 @@ System.register('flarum/mentions/addPostQuoteButton', ['flarum/extend', 'flarum/
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.$().after($container).on('mouseup', handler);
|
this.$().after($container).on('mouseup', handler);
|
||||||
document.addEventListener('selectionchange', handler, false);
|
|
||||||
|
if ('ontouchstart' in window) {
|
||||||
|
document.addEventListener('selectionchange', handler, false);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -37,6 +37,9 @@ export default function addPostQuoteButton() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.$().after($container).on('mouseup', handler);
|
this.$().after($container).on('mouseup', handler);
|
||||||
document.addEventListener('selectionchange', handler, false);
|
|
||||||
|
if ('ontouchstart' in window) {
|
||||||
|
document.addEventListener('selectionchange', handler, false);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user