Nativescript Tabview bug when switching between tabs - nativescript

I've got a tabview with 3 tabs. In the last tab, I've got a BUTTON with tap="{{ myTapEvent }}" set. I get the callback when I tap.
The problem is that if I switch to another tab (e.g. tab #1) and then back to tab #3 and tap on the BUTTON - I get 2 callbacks.
Switch between the tabs N times - when I tap on the BUTTON , I get N callbacks.
So looks like the event is being registered everytime the tab is selected but not being deregistered on selecting another tab.
If this is not the proper place, where do I report this bug.

Operator error!
I had the following:
<Button text="{{ to_date }}" onTap="{{ onDateTap }}"/>
The attribute for tap event was onTap instead of tap.
It does work - but causes the multiple callbacks.

Related

vue3 click event interferes with bootstrap js processing of dropdown

This is my first question asked here, so please be forgiving.
Asked the same question on dev.to, got no comment or answer after 1 week...
I'm using vue3, vite, bootstrap.
I'm working on a small app. One page loads some data from my server and passes it to a component to render a bootstrap dropdown. If the user selects an item from dropdown, the button type/color should change.
The first time I open the dropdown and select something, the color changes but the dropdown does not close. If I click the main dropdown button again, it closes, after that the dropdown works as intended.
I nailed down the problem to line 20 in the child component,
selectOption(optionId, event) {
this.bSelectedOption = true;
where vue listens for the #click event and sets a boolean value to true, which changes classes in the template (line 29)
<button
:class="bSelectedOption ? 'btn-success' : 'btn-danger'"
class="btn dropdown-toggle"
Commenting out line 20 or removing the dynamic
:class
makes bootstrap dropdown close on clik, but obviously does not change the color anymore.
example code on codesandbox.io
I guess the first time around something happens in the event chain of click, maybe bootstrap get's some unfinished data while vue is working on the classes? But why opening the dropdown a second and nth time works flawlessly?
I hope to have some sort of feedback to this problem in order to find a solution :)

RadListView combined Swipe & Click (Press)

I work with RadListView.
There is way to combien Click and Swipe actions ? if I set swipeActions="true" and selectionBehavior="Press" the Press event will be fired first .. The problem is I use the Press event to navigate and the navigation start on swiping !
I think there is way to achieve this on checking if swipe being to start, then disable Press event .. and when itemSwipeProgressEnded event is fired re bind Press event !!
But I hop there is way more cool to achieve to same result ?
<lv:RadListView
id="listView"
items="{{ dataItems }}"
row="1"
selectionBehavior="Press"
itemSelecting="{{ itemSelected }}"
itemSwipeProgressEnded="onSwipeCellFinished"
itemSwipeProgressStarted="onSwipeCellStarted"
itemSwipeProgressChanged="onCellSwiping"
multipleSelection="false"
swipeActions="true">

Can multiple BlueprintJS Popovers have the same target? (e.g. one for click and another for hover)

Let's say I have a Button component, and I'd like Popover A to appear upon hovering over the Button, and Popover B to appear when clicking on the button. Is this possible?
You can do this by nesting the popovers like this:
<Popover content={<div>Hover</div>} interactionKind={PopoverInteractionKind.HOVER}>
<Popover content={<div>Click</div>} interactionKind={PopoverInteractionKind.CLICK}>
<Button text="Button with two popovers"/>
</Popover>
</Popover>
There's a working example here.
In the case you don't want the hover popover to appear whenever a user clicks on the button, you can achieve this by switching to controlled usage by setting the isOpen prop. See the BP docs for more info on this.

Telerik MVC treeview - dynamically added textbox - can't click to change cursor position

I have drag drop enabled and i know that is the cause of my problem. I am allowing the tree nodes to be editable and on edit i show a textbox, but when you click in it to change the cursor position, nothing happens.
if i disable drag/drop then it is not an issue. I have tried to stop the event from bubbling up by putting click event handler for the textbox and doing preventdefault, stopPropagation, returning false, but that doesn't work.
I have also disabled the li element but that doesnt help.
Some event handler is getting called and i cannot find out which one (i have set breakpoints in all event handlers in the telerik.treeview.js but none are called when i click inside the textbox.
anybody have any idea?

The value in drop-down menu changes to default after confirming the selection

I am writing a Selenium script in Ruby (As a beginner), wherein I need to change the selection of dropdown menu.
Functionality to automate-
1.Change the drop-down selection from a default value. (This dropdown is in an iframe)
2.Press Save button.
3.Handle a popup that confirms the change.
4.Page reloads with the new selection.
I am able to change the selection on UI by using "select(locator, value)". I have already disabled Javascript to handle the popup.
Issue-
Now, when I press the 'Save' button, the page reloads with the default value that was set.
e.g- Dropdown menu has 4 options-
<option value="920">Apple</option>
<option selected="selected" value="1">Mango</option>
<option value="910">BlackBerry</option>
<option value="921">Orange</option>
Now, when I change the selection to Orange, and then press Save, the page reloads but only with option 2 selected.
Please suggest any solution/reason for this and how can it be avoided? I hope I am clear with the question.
The main reason that might be happening is because you disabled the javascript. The script usually fires the postback event which loads the page with the new selected element. You should enable the javascript and handle pop-up using switch_to_alert function and explicitly click the confirmation button like a user would.

Resources