Password view icon disappears in password editbox - xpages

I have a password editbox in XPage. When typing chars in the control, the 'Password view icon' shows up the right edge of the control.
However, if the input focus is moved to another control and back to the password control again, the 'Password view icon' never shows up.
Is this a bug? Is there any workaround?
If no workaround, is there a way to hide the "Password view icon" in any case?

This is normal behaviour in password textboxes. To remove the eye completely, add this css to your page:
input::-ms-reveal {
display: none;
}

Related

How can I hide a browser default picture upload button?

I'm configuring a picture upload button on a form. I have a green bootstrap button I am happy with, but Chrome still gives me a default, grey, pic upload button.
You can see the grey button underneath the green "Upload Project Picture" button.
I have searched my code, but can't find any way to hide it. My colleague (who is fairly experienced), has no idea either. Thanks if you can help.
I found this question, but am not sure if it's exactly the same issue:
How can I hide a button if JavaScript is disabled?
I think the best approach is to position the native element absolutely, and then move it far to the left of the viewable screen. You can then make your fancy custom submit button "be" the actual submit via javascript. Sounds hacky, but a similar solution is recommended by no less than Mozilla.
input[type=file] {
/* original submit tag pushed outside the viewport */
position: absolute;
left: -1000em;
}

SharePoint default modal dialog box not showing buttons

I've been doing searches trying to find help on this, but so far all I have found is how to set options for popping up a SharePoint modal dialog box from custom code.
However, I haven't created any custom web parts to display modal dialogs. What's happening, is if someone clicks the upload document button in a library, the upload document modal dialog comes up, but the ok and cancel buttons are half off of the bottom of the box. Users can click on them, but it just doesn't look very good.
I started playing with the CSS to make the modal dialog box bigger to reveal the buttons, and that works for the most part, but the real problem is the grant user permission dialog box.
When that is clicked, it doesn't show the ok and cancel buttons, and maximizing the dialog box doesn't reveal them. The user has to hit tab about 5-10 times before the focus moves to the ok button and is then clickable.
I would post an image, but I don't have enough reputation to do so.
Has anyone come across this? It seems very strange that the out of the box setting would have this problem.
The CSS that I use to adjust the height and width of the modal dialog is:
.ms-dlgFrame, .ms-dlgContent, .ms-dlgBorder, .ms-dlgFrameContainer
I'm just trying to set the height/min-height values, but I haven't had much luck.
We're using Internet Explorer 11 to view the pages.
Stevangelista actually pointed me in the right direction, I wish I could mark comments as answers, and since I'm new I can't upvote the comment, but here's the solution:
I am using a customized master page, and that comment had me take a look at the elements in the page.
Since the master page is being used in the dialog boxes as well, I used the s4-notdlg class to remove parts that weren't needed in the dialogs. Those parts were pushing the buttons below the bottom of the screen.
I'm not a css expert, so there may be ways of keeping those parts and still have the buttons accessible, but the particular issue I was trying to fix was resolved by using the s4-notdlg class to objects in my custom master page.

Disable a commandButton from receiving the "Enter" key

In the form I am creating, I have lots of buttons that depending on the data state, are disabled or enabled.
I have an issue where, in certain situations, my "Reset Form" button is the only enabled button left on the screen, so it accepts the "enter" keypress... and blows away all the user information.
I need to retain usage of the enter key with the other fields, but I'd like to hide this reset button from ever being seen on the page DOM as the "firstnext" button to invoke on enter keypress.
I've seen a few solutions w/ javascript, but I was hoping there was a native JSF way to do this, or even with an extension library. Taborder was of no help... Best I could come up with that works is a hidden button on the page dom in front of the reset button that dev/null's. There's gotta be some sort of cleaner solution.
Thanks in advance.
Turns out, if you declare a button as type="reset" it prevents firstnext recognition. You can still have an action="#{bean.resetFields}" method being called and it will give you the best of both worlds.

IceFaces: panelPopup autoCentre problem with IE

I'm having some problems with panelPopup and IE8. When I set autoCentre="true" and positionOnLoadOnly="true", I expect the popup to appear in the center of the view port and stay put there. This works fine in Safari, Chrome and Firefox, but in IE the popup "follows the scroll", if you see what I mean. I.e if the page where the popup is displayed is longer than the popup the popup is re-centered when I scroll the page. Also, and this is a bigger issue - if the popup is longer than the page I can only scroll part of the way down it, then it's re-centered. This means I can never see the information at the bottom of the popup...
This is the code used to generate the popup:
<ice:panelPopup
id="popup"
positionOnLoadOnly="true"
autoCentre="true"
style="z-index:999; background: #FFFFFF;"
resizable="false"
draggable="false"
modal="true"
clientOnly="true"
visible="#{SomeBean.popupRendered}" >
Any ideas?
Thanks!
According to the documentation, the autoCentre option is supposed to keep it centered through scrolling and window resizing but dragging should disable it. Turning draggable to true might give you reasonable results because the user can drag it to a position they can see the entire popup.

How is "Are you sure you want to navigate away from this page? " generated in browsers?

I have a page where I open a "modal window". It is really just a DIV, with an IFRAME inside, where I load another page. When I want to refresh the page, the browser pops up a window saying "Are you sure you want to navigate away from this page? Reloading this page will cause the modal window to disappear. Press OK to continue, or Cancel to stay on the current page."
How does this message get generated? How does the browser figure out that I have a modal window there, because I don't use any window.open() call from JavaScript? Is there any way to disable this behavior of the browser.
It may be body.onunload in the source of the page loaded in the IFRAME.
As the modal window is essentially an IFRAME, then when you close (or refresh) the main window, the browser knows it is killing that IFRAME, hence any body.onunload in that IFRAME fires.
If you have a function that handel onbeforeunload, automaticaly the Firefox message is generated.
you can disable it by returning null at the and of your handler.
This could be caused by some script modifying all off-site links to display this modal window, and then return true, or return false based upon your interaction with the modal window.
If you want to strip that behavior, you could remove all click events for external links.

Resources