We have a user that is reporting when they enter data in the Edit widget, entering Phone numbers (with dashes) when they hit dash sometimes the map zooms in and out.
Is that normal behavior?
I appreciate that. Ill add it to my portal hack list
Jeffrey Pace
Tech Lead
Geographic Information Services Division
Information Technology Department
Manatee County Government
1112 Manatee Avenue West
Bradenton, FL 34205
jeff.pace@mymanatee.org
(941)748-4501 x3870
Jeff,
Here is a little change you can make to the Edit Widget.js to disable keyboard navigation when the Edit widgets popup is showing and re-enable when it is hidden (lines 7 and 13 added to the bellow functions):
_onEditorPopupShow<SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="comment token">// disable event for editorATI</SPAN> <SPAN class="keyword token">var</SPAN> currentFeature <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>editor<SPAN class="punctuation token">.</SPAN>attributeInspector<SPAN class="punctuation token">.</SPAN>_currentFeature<SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">//var currentLayer = currentFeature.getLayer();</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">_disableToAnswerEventForEditorATI</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">_createRelatedRecordsEditor</SPAN><SPAN class="punctuation token">(</SPAN>currentFeature<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>map<SPAN class="punctuation token">.</SPAN><SPAN class="token function">disableKeyboardNavigation</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN> _onEditorPopupHide<SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="comment token">// enable event for editorATI</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">_enableToAnswerEventForEditorATI</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>map<SPAN class="punctuation token">.</SPAN><SPAN class="token function">enableKeyboardNavigation</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
I can confirm if i move the mouse off the popup it will enable keyboard navigation. if there anyway to disable this? its so annoying
Ken and Robert,
I think what we are observing is
1. Occassionally when an input box is activate, and the mouse is over the input box, +- still zoom the map.
2. There is also a guess i difference of opinion on what SHOULD happen. for me, if the cursor is active in an input, map navigation should never occur. even if i move my mouse off the input and over the map, the "activate input" should override. Map navigation should not resume until i purposely click off the input or onto the map.
What I'm saying is that's easy to reproduce. If I have the mouse in any place but the map (popup, Edit widget, etc) the +/- keys will work as expected. When the mouse is on the map, using the number pad will result in map navigation. I can use the regular number keys, but the +/- keys on the main keyboard will also zoom.
The issue Jeff and I have noticed is that the map keyboard navigation is not always disabled when entering data into inputs in widget. This sporadic behavior though as normally this is not an issue but sometimes when clicking into a input box and using the numberpad on the keyboard the minus, plus, 8, 4, 6, 2 keys will result in map navigation. It is as if the map fails to release focus or the input control does not receive focus.
Have you tested whether it's reproducible when the cursor is over the map and not the Edit widget. I've noticed that when I use Ctrl + or - to change the zoom factor of the page itself, if the cursor is on the map, the map itself will zoom, but the page will not.
Hi Jeff,
I can confirm that we don't have any bugs/issues related to hotkey/keyboard shortcuts in Web AppBuilder. Best thing to do is try and get some repro steps for us to take a look at.
Hope this helps,
I has been around for a while now so probably not.
Any idea if this bug has been reported? its sporadic so hard to reproduce . dlaw-esristaff
I have seen this happen sporadically. It seems like a bug and is not specific to the Edit widget. I have seen this happen with any widget that uses a text input.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.