Is tabbing behavior affected when used inside an iframe? - javascript

I'm currently attempting to tab through some react components that I've (text inputs, checkboxes, radio buttons, etc) implemented (using material-ui). Something I've discovered is that tabbing through my components locally works as expected but as soon as I put it on the server, it skips through my checkboxes & radiobuttons (but tabbing to text inputs works fine).
The website that I'm displaying my react project on is built on backbone and I'm basically displaying an iframe with my react project inside that. Is it possible that this has some effect on a user's ability to tab through the components inside an iframe?
Thanks for your help!

With some help from above, I was able to figure out that when I render my react project inside the backbone project, some components such as my checkbox and radio buttons are wrapped inside a <span> tag and in order for it to be able to be tabbed I had to add the tagIndex attribute to it. Thanks everyone!

Related

React App Crashes When a certain Component Rendered

To be honest, I don't know what really causes the problem but will try to explain it.
In my react app, I have placed a Google Translate Widget (which is retired some years ago) to easily translate whole website in just a click. It works fine until I am clicking on a MODAL or some button that changes TAB without changing routes. I mean, when routing there is no problem but if new component renders in the same route (like it does in MODAL and TAB component), the app crashes and all I am getting is a blank page.
Images to make it clearer:
As it seems, Google translated page to French in homepage here is a different route and everything seems OK.
BUT when I click on Make a Reservation Button (which is the vertical one) or All Features button (which is the black one at the bottom), distressingly this is what I get:
A blank page. So, without using google-translate-widget all is working without a problem. But if the page is translated and user clicks on a button renders some component on the same route this happens. ANY solution suggestion or comment means so much to me.
Thank you.
I got the component which cause the insertBefore error inside span tag. It solved the issue.

how to make the content of a page change according to a menu option?

I am working with a Dashboard that has a menu. Let's take the attached menu as an example (which is NOT mine, I took a snapshot from a video).
Could you give me an idea of how I can do so that when pressing an option from the side menu, the content on the right side changes. Should I create an html document for each possible option and reference it from an "a href tag" or is there some other way to do it? Preferably the solution or idea does not involve react, angular or vue.
If you are not using any of SPA (Single page Application) then you must have to go for multipage activities where you need href on each option given in your main menu.

Appium client doesn't allow to select specific element on the screen of react-native app

I'm working on the react-native application and using Appium for automation testing. I'm facing a problem on the Appium sandbox. On certain pages I can't select a specific element. Any attempt to tap on the screen to select a specific element ends with highlighting the entire screen/container, with no access to any child element inside of the container. On some screens, everything is working fine.
I first thought that perhaps the problem is in layout or certain elements. I checked the styles of the elements and the space that they are taking on the screens and didn't notice that something is taking the entire screen. On the page, I'm also using components from the lottie-react-native library, I thought that maybe something is wrong with the elements, but on other pages, I don't have such an issue. Perhaps anyone faced this problem as well?
Thank you in advance.

Using vue js without components

I went through laracasts vuejs tutorials few times, thenetninja on youtube and few others..
So I decided to change my website front into vue because of reactivity.
Like for toggles and other stuff. But there are also components which are very useful and cool but in my case it seems like they are mostly unneeded.
Every tutorial is about basic things but in my case where I have:
<component-a>
<component-b></component-b>
</component-a>
<component-c></component-c>
And inside <component-b> I click on button and with that I need to change something in <component-c>.
I don't know how to do this besides adding everything inside one component which is not the case because some things are not supposed to be rendered if user is not logged in:
<component-c>
#if(auth()->user())
<component-d></component-d>
#endif
<component-e></component-e>
</component-c>
And I can't use php inside .vue :D
So I leave everything as it is and make reactivity based on that without using components.
Is that bad?
If it is, how to alter component-d on some click inside component-b with using components?
(In my case, B is dropdown menu from topbar and D is tab section that changes on that dropdown menu item clicks)
If certain content must be hidden from the client you can't use vue and just keep using php and laravel blade's #if, but then "reactivity" can only take place on a full page load.
If the content must only be hidden visually, of can be retrieved via an API then you can use Vue directives like v-if, v-show and use javascript to show and hide components.

Getting data from javascript drag and drop

I want to make a few boxes that I can drag and drop into other boxes/tables. After searching around the web, it doesn't seem like a big problem to solve. But how do I know where the boxes have been dropped when i submit the page? I'm using mvc3 so my viewmodel needs to know how the boxes have been placed when the page is submitted. The page consists of other forms that need to be filled out too.
Use some library like jQuery UI droppable to provide the drag and drop functionality. The library will always expose some event that you can hook up and react to appropriately (e.g. by modifying the values of hidden input elements).
What you would do exactly inside the event handler depends on the particulars of your application and ViewModel.

Categories