text select patch

text select doesn't seem to work on iOS (because of course), so making a
quick adjustment and hopefully that solves the problem
This commit is contained in:
RXP 2025-05-18 07:51:58 -06:00
parent 5300c91058
commit 28a2a2bc1e
Signed by: ro
GPG key ID: 976711B5057688B7
4 changed files with 9 additions and 2 deletions

View file

@ -12,3 +12,6 @@
@import url("page-editor-highlights.css");
@import url("settings.css");
@import url("navigation.css");
@import url("core.min.css");
@import url("textrix.min.css");
@import url("textrix.spacing.css");

View file

@ -1,9 +1,11 @@
import Editor from './controllers/PageEditor.js';
import Fresh from './controllers/FreshEditor.js';
document.addEventListener(
'DOMContentLoaded',
function () {
new Editor();
//new Fresh();
},
false
);

View file

@ -42,7 +42,7 @@ export default class PostEditor {
let textEdit = document.getElementById('edit');
let control = document.querySelector('.text-editor-control');
textEdit.addEventListener('select', e => {
textEdit.addEventListener('selectionchange', e => {
if (!self.textSelected) {
self.textSelected = true;
control.classList.remove('hide-el');
@ -139,7 +139,6 @@ export default class PostEditor {
let meta = document.querySelector('.meta');
for (var i = 0, length = metas.length; i < length; i++) {
metas[i].addEventListener('click', e => {
console.log('CLICK');
let metaO = window.getComputedStyle(meta).getPropertyValue('opacity');
if (metaO == 0) {
meta.classList.remove('hide-el');

View file

@ -65,6 +65,8 @@
</div>
</section>
<section class="text-editor">
<div class="page-title">
<textarea id="post-title-text" class="input-dark" type="text" name="post-title-text" class="post-edit" placeholder="TITLE">{{$editTitle}}</textarea>
</div>
@ -72,6 +74,7 @@
<textarea id="edit" spellcheck="false" class="language-md">{{$content}}</textarea>
<pre id="highlight"><code id="highlight-content" class="language-md"></code></pre>
</div>
</section>
@endsection
@section('scripting')