mirror of
https://github.com/flarum/core.git
synced 2025-07-28 12:10:51 +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 {
|
||||
setters: [function (_flarumExtend) {
|
||||
/*global getCaretCoordinates*/
|
||||
|
||||
extend = _flarumExtend.extend;
|
||||
}, function (_flarumComponentsComposerBody) {
|
||||
ComposerBody = _flarumComponentsComposerBody.default;
|
||||
@@ -681,7 +679,10 @@ System.register('flarum/mentions/addPostQuoteButton', ['flarum/extend', 'flarum/
|
||||
};
|
||||
|
||||
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);
|
||||
document.addEventListener('selectionchange', handler, false);
|
||||
|
||||
if ('ontouchstart' in window) {
|
||||
document.addEventListener('selectionchange', handler, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user