Misplaced button in dialog window of JqGrid, works fine while developers tools opened - css

The strangest behaviour occured and I can't handle it myself.
I have ASP .NET MVC application with Jqgrid version 5.1.0. Everything works fine, beside one dialog window.
In my grid I use default deletion method. There is delete button defined by $(tableHtmlId).navGrid( ... ) function. After clicking delete button, confirmation dialog window appears. This dialog has misplaced cancel button (the one on top-right corner), as shown on following screen:
I thought about editing css styles, so I hit the console button, and as soon as develpers tool window appeard, look what happened:
Everything look fine. However, when I put cursor over cancel button, it goes back to wrong:
This behaviour occurs on Chrome, Firefox and IE. This bug is too atomic for me to solve. Please help. :)

Related

Potential conflict between a Dialog and Back button

I nailed down a weird behavior on JQM.
Since the page is based on JQM Boiler plate, I do not include the full page here. I published the code on jsfiddle.
Here is a summary of the behavior click actions:
Here is the extract of the relevant code:
<div id="oneapart"
data-add-back-btn="true"
data-back-btn-text="List"
data-role="page"
data-title="Home page">
I do not understand why the last click on the List button (a jquery mobile back button) requires 2 click to actually act on the link. In fact, the weird behavior is that a first click highlight the button in blue, but it remains as is without switching to the previous page until a second click happens.
Any help will be appreciated.
Regards.
This issue can be fixed by adding the data-rel="back" to the button in the popup.
The issue posted on Github has been marked as resolved because of that.
The issue happens because data-rel="back" is missing in the link of the large cancel button in #jerone his fiddle. See "Closing dialogs" here: http://jquerymobile.com/test/docs/pages/dialog/index.html
The back button on pageTwo is dynamically created. When you don't use data-rel="back" on the link that brings you back from dialogThree (which is also a page) to pageTwo it adds an item to the history stack. That's why the back button on pageTwo then requires two clicks to actually bring you back to pageOne.
The active state is removed from a (back) button on the pagehide event. On the first click you stay on the same page, so this event doesn't fire and the button keeps the active state.
I added data-rel="back" and then everything works as expected: http://jsfiddle.net/jEesE/6/
Closing as resolved.
The bug you're describing consists of 2 parts;
why does it require two clicks to revert?
why stays the button active (blue)?
The first part of the bug is not a bug; you open a popup, but instead of going back (e.g. data-rel='back' you open a page that is the same as the previous one. So if you press the back button, it reopens the previous page that is actually the same page as you were on right now (if it make sense).
Why the button stays active, I don't know...
EDIT: I cleaned up your code a bit: http://jsfiddle.net/jerone/jEesE/3/

Xcode 4 Inspector Panel tells me "No Selection" no matter what

I have a window, a label, a button, and an NSObject.
The first thing I want to do is change the NSObject's class to that of my custom controller.
The thing is, I can't seem to select it. Whatever object I select, the inspector panel says "No Selection". Why? I'm baffled.
accepted answer did not work for me, but answer by 'NSExplorer' did (In Xcode4, the new interface builder says "no selection"). i slightly modified answer from 'NSExplorer'
.. switch to another (non IB) file in the current tab
.. switch back to the IB file (eg. Main.storyboard)
the Attributes Inspector will magically show in the new tab.
I just had to close the assistant editor and the debug area and then it magically showed up. If you don't have the assistant editor open then all you need to do is open it, then close it again. That should fix it too.
If you don't know what the assistant editor is I have highlighted it in red:
Xcode 7.2
The interface builder in XCode 4 is incredibly buggy. I'm also having frequent issues like this. Have you tried closing XCode and re-opening your project? Sometimes, resizing the entire XCode window also seems to reset the interface builder layout.
Make sure you're selecting the objects from the XIB document panel (Where it says "Objects") on the left. Sometimes clicking the actual UI controls doesn't catch in the inspector panel, for whatever reason.
For me, I had the bottom, debugger stretched all away to the top. It said "no selection." By Taping on hide/open bottom debugger twice, you can get the main component back again.
If you have multiple windows, close the storyboard file and open it again, it worked for me

File input behaviour in IE

I have noticed a difference in behaviour between chrome and IE of handling file input clicks.
jsFiddle example here.
In Chrome, clicking anywhere on the input (text or button bit) triggers the file dialogue.
In IE (testing on 7), you have to click on the actual button, not the text bit.
The problem is that I'm using a transparent file input on top of a regular text box. Clicking on the text box should open the dialog. In Chrome this is working fine, as the total size of the input is the same size as my text box.
In IE it doesn't work properly as the user needs to be clicking on the actual button part of the transparent file input.
Any ideas of how to fix this??
Thanks
Have a look at how these guys have done it: http://www.filamentgroup.com/lab/jquery_custom_file_input_book_designing_with_progressive_enhancement/
The strategy is the the same, overlay a custom designed file input over a standard one and get the user to interact with the standard one.
They have written a small hack to support the click for IE and Opera, using jQuery to bind a click event explicitly.
See: http://dwpe.googlecode.com/svn/trunk/fileinput/js/jQuery.fileinput.js (Line 52)
You need to find a way to trigger a click event on the file input box..
Maybe adding a click handler on the underlying textbox which issues the click event to the file box.
example: http://jsfiddle.net/MqbrV/
It does not work in Firefox (but the default action should be enough) and Opera (where none works).

Keyboard fails in IE8 after AJAX call

I've run into a strange problem with an HTML form. I've built a dynamic table that adds a new row when you enter data into an existing blank row; because there are some server requirements in adding a row, I make an AJAX call to do this in the onblur event. It took a while to make this work for all browsers, but eventually all was happy with the world ... until IE8. Now, what happens is that, when the call returns from AJAX, the cursor shows in the next textbox (correctly), but the keyboard no longer works. I have to close the modal window (actually an IFRAME), then the keyboard starts to work again. If I put IE8 into compatibility mode, it works fine.
Has anybody seen behavior like this, or have any ideas for a workaround?
Thanks, Jim
I had problems with DIVs placed above an INPUT, that cloacked the cursor... and once the DIV was not above it, the cursor appeared back again.
Just an idea: Maybe your IFRAME captured the focus (and/or the keyboard).

window.open not working when attached on onload event in chrome and safari

I have attached some javascript on onload event of the form. this script contains window.open. Although this works fine in all the browsers window.open doesn't open a new window nor it gives nay error message in google chrome and firefox.
I want to first check the screen resolution if it is less than 1024 then I would open it in a new window without menu,toolbar and others so that the user has more space to work on.
This is a feature, not a bug! :)
remember back in the '90s when pop-up windows annoyed the crap out of everyone? Well, because of the MASSIVE abuse of that JavaScript behavior, now the only way to open windows is with direct user interaction; like a click.
If you have a legitimate reason for opening another window, attach a click event to a button labeled such that it properly indicates you'll be opening a window. If your user wants to open the window, they will do so, and it will correctly get past any but the stupidest popup blockers. If they don't want to, you should not be opening a window in the first place.

Resources