tooltipster.js: Tooltip getting overlayed on one another - tooltipster

Here's the JSFiddle:
https://jsfiddle.net/68umt5b3/
As you notice, tooltips are getting changed, but they overlay on one another. Removing 'multiple: true' helps, but my MAC gets overloaded and browser crashes, saying:
Tooltipster: one or more tooltips are already attached to this
element: ignoring. Use the "multiple" option to attach more tooltips.
I only need one tooltipster shown at the time. How can I fix this?

Use the content method to update the content of the tooltip, or destroy it and create a new one.

Related

Quasar QSelect popup and input text persistent on click

I am trying to set up a QSelect driven by user input in order to achieve an "autocomplete" behavior. There are a few examples on the official documentation and they make use of the #filter callback.
I have currently two problems:
Whenever I click outside of the input field the input text is lost and the popup disappears.
If I click on the input the current text remains, but the pop is hidden until I click on it again.
For the latter issue, one workaround is to force the popup to show upon click:
<q-select
ref="input"
...
#click.native.prevent="onClick"
>
...
onClick(){
if( this.searchFilter.length > 0){
this.$refs.input.showPopup()
}
}
However, the inconvenience is that the popup still shortly disappears for a short while before showing again. I've also tried using #click.native.stop instead of #click.native.prevent to no avail.
As for issue number 1 I haven't even found a workaround yet.
Here is a related issue, though the popup disappearing was a wanted behavior in his case.
I set up a basic Pen to illustrate the issue. Try clicking on the input or outside the input at the same height.
The trick was to use #click.capture.native and then conditionally stop the propagation inside the callback function via event.stopImmediatePropagation() See it working here

DOJO 1.9. FilteringSelect ComboBox scroll to last selected item on show [IE]

How to make dropdown scroll to the last selected option after dropdown is re-opened?
Calling filtering_select_ref.dropdown.set('selected', selected_node_ref) or filtering_select_ref.set('scrollOnFocus', true) did not work for me on IE 11.
If you just need to scroll to the option, you could use win.scrollIntoView(node_ref) from "dojo/window" module as shown in the docs and pass the id or the node reference to the option as an argument.
You may also find these methods interesting to help solve your problem:
filtering_select_ref.openDropDown()
var dropdown = filtering_select_ref.dropdown;
dropdown.selectFirstNode()
dropdown.selectNextNode()
dropdown.selectPreviousNode()
dropdown.selectLastNode()
#Carlos Nantes suggested good options however I was aware of them and my problem with them was that I could not "catch" the moment when dropdown got opened.
I finally found a way to "catch" that moment with filtering_select_ref.watch('_opened', function()...
watch doc can be found here

How to remove this border from tooltipdialog that shows up on mouse click?

Whenever I click inside a tooltipdialog, this border shows up around it.
Is there an easy way to remove this?
EDIT: After trying in different browsers, it seems to affect only Chrome, the outline doesn't appear in Firefox or IE.
I faces the similar issue when i started working on Dojo. To fix this basically you need to add the following css for dijit's dijitTooltipDialog class
.dijitTooltipDialog {
outline : none
}
See this for example.

Can't click element inside iframe

On the screenhsot below is HTML-code of iframe.
The first two red marked object can be identified by Webdriver however the last marked (which is a button) can't be clicked by Webdriver. I have tried click it using different ways (like click by id, name, etc). But I still can't click the submit button.
Please help me to click that submit button inside the frame.
You need to use switchTo().frame() to access content within a frame or iframe.
driver.switchTo().frame("name"); // where name is the name of the iframe i.e. name="frameName", you would use framename
driver.switchTo().frame(0); // You can switch to the frame by index
driver.switchTo().frame(element); // You can switch to the frame by a WebElement reference
In your particular case you can use:
driver.switchTo().frame("InstantSgn");
To switch out of the frame after you're done within the iframe context:
driver.switchTo().defaultContent();
Same issue happened to me today. It might be simply due to you not switching to the frame, or it could be something I experienced.
This happened to me in IE only. In Chrome there is no problem at all.
Actual Code
As you can see, I did switch to the frame to make sure this element could be found. But, it could not be. The only solution that I found was to put Thread.Sleep(2000) to make it pass. I am not quite sure why, but I guess it has something to do with the content not being available in the DOM.

How to click on Toolbar Item with selenium?

Web page contain a button with some text for example "Test". This button actually is a toolbar element. ( class ="tbButton" id="id",text="Test") and redirects to a certain table when press on it.
When try to use the following click methods
selenium.click("id");
selenium.doubleClick("id");
selenium.click("//*[text()='Test'and contains(#class, 'tbButton')] ");
the button does not react
Could enybody show an alternative methods that is able to resolve a problem
It's hard to know exactly what the problem is without knowing more about the actual contents of the page you are testing. Is there an example of the toolbar online somewhere?
With modern interfaces, locating elements with Selenium is not always an exact science. Here are a few suggestions:
With modern interfaces you often find that the DOM is being manipulated, so it is possible that the identifier you are using is no longer valid by the time you get to your click(). Use Firebug to check that you have the correct element.
Often it helps to click on the parent of the element, such as a div or the parent table cell. Again, use FireBug, to try some other elements near your toolbar button. Alternatively, Firebug sometimes reveals that the element contains other elements. You might have more luck changing the target to a contained element instead.
Sometimes you have to play around with some of the alternative actions. For instance, some controls respond to a mouseDown() followed by a mouseUp(), but not to a click(). Again you can often get hints from looking at the source with Firebug.