Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Home and End button move caret in text fields #1188

Closed
teosarca opened this issue Sep 8, 2017 · 5 comments
Closed

Home and End button move caret in text fields #1188

teosarca opened this issue Sep 8, 2017 · 5 comments

Comments

@teosarca
Copy link
Member

teosarca commented Sep 8, 2017

Type of issue

Bug

Steps to reproduce

  • open material receipt candidates: https://w101.metasfresh.com:8443/window/540196

  • select a line and receive, e.g.
    image
    image

  • select the HU (e.g. first line) and call a process which has parameters, e.g. Materialentnahme (partial)
    image

  • the cursor is inside the "Menge TU" field (i.e. the one and only text field).
    Now press "HOME" or "END" keyboard buttons to move your cursor to be beginning or to en END, but nothing happens. Instead, the key press is intercepted by the underlying view and the frontend tries to navigate it forward/backward.
    image

Expected behavior

When the cursor is inside a text field, the HOME and END keys shall work.
Regression: make sure, when browsing a view, the HOME and END key will navigate you to first/last page.

@metas-mk metas-mk added this to the Backlog milestone Sep 8, 2017
@metas-mk metas-mk assigned pablosichert and unassigned wiadev Sep 21, 2017
@siemiatj siemiatj self-assigned this Aug 17, 2018
@siemiatj siemiatj changed the title Home and End button not working in process parameters when called from modal view Home and End button move caret in text fields Aug 20, 2018
metas-mk added a commit to metasfresh/metasfresh that referenced this issue Aug 25, 2018
Adds new Issue
metasfresh/metasfresh-webui-frontend-legacy#1188
Home and End button move caret in text fields
metas-ts added a commit to metasfresh/metasfresh that referenced this issue Aug 27, 2018
[#4492](#4492) Project Status and Product Category Trl
[#4494](#4494) Projecttype Org Validation
[#4448](#4448) Advanced BLs to create inventory lines
[#4450](#4450) Tablet optimized inventory-counting-window
[#4482](#4482) Support Doctype Text templates also on purchase order
[#4498](#4498) Make fields in explicit user filter mandatory or optional
[#4501](#4501) LogicExpressionEvaluator: improve error message in case something went wrong
[#4517](#4517) Extend Sales Order REST API to support price and support all product values
[#1878](metasfresh/metasfresh-webui-frontend-legacy#1878) Forgot password feature
[#4483](#4483) Payment allocation form does not show invoices
[#4499](#4499) Cannot create letter
[#4504](#4504) Mandatory logic broken for C_FlatrateTerm.C_Currency_ID
[#4506](#4506) Compensation Group's subtotals gets broken after setting/changing the flatrate conditions
[#4509](#4509) NPE in Compensation Groups creation
[#4514](#4514) Include sales orders REST API to metasfresh-dist/serverRoot
[#1188](metasfresh/metasfresh-webui-frontend-legacy#1188) Home and End button move caret in text fields
[#1463](metasfresh/metasfresh-webui-frontend-legacy#1463) Unable to execute any quick actions in Firefox
[#1578](metasfresh/metasfresh-webui-frontend-legacy#1578) Applied filter params sometimes not displayed in filter
[#1589](metasfresh/metasfresh-webui-frontend-legacy#1589) included tab: when refreshing via websocket event the sort/order is not preserved
[#1707](metasfresh/metasfresh-webui-frontend-legacy#1707) Red line is missing when a document was not saved
[#1872](metasfresh/metasfresh-webui-frontend-legacy#1872) [alt]+u not working as before
[#1923](metasfresh/metasfresh-webui-frontend-legacy#1923) Sequence of Dropdowns in combined Business Partner Lookups not working
[#1927](metasfresh/metasfresh-webui-frontend-legacy#1927) No additional filter parameter from a dropdown selectable when filter has a default value set
@metas-dh
Copy link
Member

Results of IT1
tested in mf15

tested in material receipt cands, with processes for labels (e.g. IFCO) where there was only 1 text field (since Materialentnahme was not available):

  • nothing happened when pressing Home or End key: NOK
  • console:
Uncaught DOMException: Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('number') does not support selection.
    at t.value [as setCaretPosition] (https://mf15cloudit/bundle-e706e0fad24580059f8f-git-a648a51.js:70:439457)
    at TEXT_START (https://mf15cloudit/bundle-e706e0fad24580059f8f-git-a648a51.js:70:439182)
    at t.value [as fireHandlers] (https://mf15cloudit/bundle-e706e0fad24580059f8f-git-a648a51.js:77:231074)
    at HTMLDocument.value (https://mf15cloudit/bundle-e706e0fad24580059f8f-git-a648a51.js:77:231662)
  • Home and End key worked fine for navigating to first / last page: OK

@siemiatj
Copy link
Contributor

oh, looks like a browser thing. Checking.

@siemiatj
Copy link
Contributor

@metas-dh can you give link-share screen ? I can't find any item editable in material receipt candidates and everywhere else I'm trying this things seem to work fine.

@siemiatj
Copy link
Contributor

Ok, found a field to repro this. The thing is this will only work for text inputs. Other input types don't support moving caret and this is something we can't really walk around as it's a browser limitation. Created a PR to fix error in the console by firing HOME/END handlers only for text inputs.

@metas-dh
Copy link
Member

Results of IT2
tested in mf15

  • pressing Home or End key working in fields with text inputs: OK (checked in e.g. order reference / MHD attribute in material receipt cands)
  • Home and End key worked fine for navigating to first / last page: OK

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants