vue-wysiwyg icon indicating copy to clipboard operation
vue-wysiwyg copied to clipboard

Link inputs focus

Open fureszk opened this issue 6 years ago • 8 comments

Cannot focus on the input fields by clicking on them, has to click on the labels next to them or use the keyboard. Google Chrome latest.

fureszk avatar Jul 09 '18 15:07 fureszk

This bug makes it extremely hard for users to enter information into input fields. Is anyone working on this issue or found workaround solutions ? thanks!

altronic avatar Aug 07 '18 04:08 altronic

@altronic Here is the workaround I use (requires jQuery):

$( document ).ready(function() {
    $('.editr--toolbar .dashboard label').click(function (event) {$(event.target).focus()});
});

fureszk avatar Aug 07 '18 04:08 fureszk

It works! Thank you so much !!

altronic avatar Aug 07 '18 07:08 altronic

table as well

berendsmatt avatar Aug 29 '18 03:08 berendsmatt

:+1:

btouchard avatar Sep 19 '18 15:09 btouchard

	onBtnClick ($event) {
		$event.preventDefault(); block input fields

you can in Button.vue remove onmousedown from form and change a tag to button and set there @click.prevent="onBtnClick"

alesandro777 avatar Oct 21 '18 10:10 alesandro777

const items = [].slice.call(document.querySelectorAll('.editr--toolbar .dashboard form'));
      items.forEach(function (item, idx) {
        item.addEventListener('click', function(e) {
         e.target.focus()
        }.bind(this))
      })

In plain javascript

abdulrahimtetrahex avatar Nov 20 '18 11:11 abdulrahimtetrahex

You can change directly the hyperlink.vue file and build again with following changes:

<template>
    <form @submit.prevent="insertLink">
        <input
            ref="url"
            id="wysiwyg-input-text"
            type="text"
            style="width: 30%"
            v-model="url"
            placeholder="Paste URL here.."
            onclick="document.getElementById('wysiwyg-input-text').focus()"
        >
        <input
            id="wysiwyg-input-title"
            type="text"
            style="width: 30%"
            v-model="title"
            placeholder="Set Title here.."
            onclick="document.getElementById('wysiwyg-input-title').focus()"
        >
        <button
            type="submit"
            >ADD</button>
    </form>

</template>

tiofabby avatar Jun 21 '21 12:06 tiofabby