Hi all,I struggled with issue #547 quite a bit today, but couldn't come up with a reasonable solution.Following the instructions reported in the issue description, I was able to reproduce the bug easily. After a lot of trial-and-error, I concluded that the weird shift up of the view is triggered by a call to the DOM API method focus() on the cell's editor input element (happens only for TextFields, not ComboBoxes).In order to see this, follow the procedure detailed in the issue and the grid editor for the newly added parameter should generate HTML markup similar to this:<div class="x-layer x-editor x-small-editor x-grid-editor" id="ext-comp-1083" style="position: absolute; z-index: 11000; visibility: hidden; left: -10000px; top: -10000px; overflow: hidden;"><input type="text" size="20" autocomplete="off" id="ext-comp-1082" name="" class="x-form-text x-form-field" style="width: 100px; height: 14px;"></div>Then, run this JS code in Chrome's DevTools Console:var ed = document.getElementById("ext-comp-1083");var inp = document.getElementById("ext-comp-1082");// make grid editor visibleed.style.left = "112px";ed.style.top = "48px";ed.style.visibility = "visible";inp.focus(); // the entire PropertyGrid should shift up!
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.
Hi Stefano,
My guess is that some DOM element is changing its scrollTop value due to the input taking focus. This seems to be a chrome issue, but since we need to workaround it what I would do is:1) trying to investigate if this is the case and which DOM element is scrolled2) wraparound all instances of inp.focus() with scrollTop value save / restore
Note: what do we lose if we comment inp.focus() as you suggest? Is the textfield focused anyway?
ThanksMauro--==
GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.
==Dott. Mauro Bartolomeoli@mauro_bartSenior Software EngineerGeoSolutions S.A.S.Via Poggio alle Viti 118755054 Massarosa (LU)Italyphone: +39 0584 962313fax: +39 0584 1660272-------------------------------------------------------AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.
--
You received this message because you are subscribed to the Google Groups "mapstore-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-develo...@googlegroups.com.
To post to this group, send email to mapstore-...@googlegroups.com.
Visit this group at http://groups.google.com/group/mapstore-developers.
For more options, visit https://groups.google.com/d/optout.
Basically, I'm replacing the focus() function with the empty function on all editors making use of a TextField (or one of its subclasses). This works quite well, the problem is gone; the only drawback is that you need to click twice on the grid cell you want to edit to actually gain focus.Note: what do we lose if we comment inp.focus() as you suggest? Is the textfield focused anyway?As I said earlier, yes, the textfield can be focused anyway clicking twice on the grid cell to edit.Do you think all this madness makes for an acceptable workaround? ;-)
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.
--