mirror of
https://github.com/flarum/core.git
synced 2025-07-30 21:20:24 +02:00
Tweak quote button positioning/style
Now appears where your cursor ends the selection, but not overlapping text.
This commit is contained in:
@@ -26,12 +26,20 @@ export default class PostQuoteButton extends Button {
|
||||
$(document).on('mousedown', this.hide.bind(this));
|
||||
}
|
||||
|
||||
show(left, top) {
|
||||
showStart(left, top) {
|
||||
const $this = this.$();
|
||||
|
||||
$this.show()
|
||||
.css('top', top - $this.outerHeight() - 5)
|
||||
.css('left', left);
|
||||
.css('left', left)
|
||||
.css('top', $(window).scrollTop() + top - $this.outerHeight() - 5);
|
||||
}
|
||||
|
||||
showEnd(right, bottom) {
|
||||
const $this = this.$();
|
||||
|
||||
$this.show()
|
||||
.css('left', right - $this.outerWidth())
|
||||
.css('top', $(window).scrollTop() + bottom + 5)
|
||||
}
|
||||
|
||||
hide() {
|
||||
|
Reference in New Issue
Block a user