Vuetify Combobox issue when clicking on the edge of another combobox or outside of combobox
NickName:DRW Ask DateTime:2020-06-10T10:23:36

Vuetify Combobox issue when clicking on the edge of another combobox or outside of combobox

I have a simple page that uses vuetify combobxes and vuetify inputs. I have been working on a way to switch focus of the comboboxes when an added item is confirmed to be added to the list. This works correctly and the focus does take hold.

The issue I am having is when there is text in the combobox and you click anywhere else outside of the combobox or on the top edge of another combobx, I get the following error

[Vue warn]: Error in v-on handler: "TypeError: Cannot read property 'id' of null"
TypeError: Cannot read property 'id' of null

If I click directly in the next input the focus changes as expected

I think this error is coming from this method

thisFocus(event) {
      const controlName = this.setToTitleCase(event.target.id);

      if (this.currentFocus && this.showDialog &&
        event.target.id !== 'condition') {
          this.nextFocus = controlName;
          return
        }
      this.currentFocus = controlName;
    }

I also have an example setup in a code sandbox as well you can find it here Sample code with error

I am looking for some help to resolve this error or at least get pointed in the right direction

EDIT: To better clarify this issue, what I have gathered is the control highlighted in blue in the image below is the complete v-combobox component of vuetify. vuetify v-combobox

The v-combobox component has another component inside the combobox component used for messaging as shown in the highlighted area of the image below. v-combobox message area

The issue I am having is that if you happen to click on that message area rather than the input component. I believe I understand why the event.relatedTarget is null but I can't figure out what I need to make sure the focus goes to the correct input component if you happen to click on the message area.

Copyright Notice:Content Author:「DRW」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/62294822/vuetify-combobox-issue-when-clicking-on-the-edge-of-another-combobox-or-outside

More about “Vuetify Combobox issue when clicking on the edge of another combobox or outside of combobox” related questions

Vuetify Combobox issue when clicking on the edge of another combobox or outside of combobox

I have a simple page that uses vuetify combobxes and vuetify inputs. I have been working on a way to switch focus of the comboboxes when an added item is confirmed to be added to the list. This works

Show Detail

Vuetify combobox set focus to the next combobox when yes is clicked on a dialog

I am using Vuetify combox control in a project I also have a dialog that pops up @blur to the next combobox to confirm the entry that is typed in the first combobox I am have two issues going on. ...

Show Detail

Vuetify combobox not creating new object on Enter

Using Vuetify, I'm unable to create new objects via the combobox when pressing enter even when using the exact markup and data configuration provided in the docs. In a JSFiddle, it functions as exp...

Show Detail

Vuetify combobox - How to disable typing in vuetify's combobox

The vuetify combobox is allowing the user to type inside the combobox. Any clue on how to disable this. This is how I have implemented my combobox. <v-combobox :loading="isSurveyBeingPopulated"

Show Detail

Vuetify combobox - How to disable typing in vuetify's combobox

The vuetify combobox is allowing the user to type inside the combobox. Any clue on how to disable this. This is how I have implemented my combobox. <v-combobox :loading="isSurveyBeingPopulated"

Show Detail

ComboBox is Overriding Another ComboBox using Excel 2013 VBA

I am trying to use comboboxes to hide/unhide specific sections of my excel sheet. I have one combobox that hides/unhides a specific block (ComboBox1) of cells and another that hides/unhides sectio...

Show Detail

Vuetify combobox Value Set up

I used vuetify v-select but just change to v-combobox. There is a problem with value. For the v-select it was [{ "text":"(NEC (1)) NEC work orders", "value":"

Show Detail

Populate a Combobox with another Combobox dynamically

I'm trying to populate a combobox with another combobox but something is wrong when changing values. When i select an item in combobox1, it loads the values from the database as it should to combo...

Show Detail

WPF Combobox allow clicking on items outside

Default behavior of WPF Combobox is when it expanded and the user clicks anywhere outside of it then it collapses. Is it possible to make such Combobox that won't deactivate other controls when ex...

Show Detail

load contents of array of objects into a vuetify combobox

I have this piece of code really confused me. I'm using typescript with vue (vuetify) and I'm still pretty new with typescript. I have an array of objects that I want to load as items into a vuetify

Show Detail