Comments (2)
Hi Holger,
That could be a nice improvement but I personally like separation of concerns. So, one dedicated function for delay, one dedicated function for focus, and one dedicated function for text selection.
With supposedly API .....focus( [selectText], [delay] );
What if something happens during delay, how can I cancel the timer and focus? Or what if someone needs more convenience to select a part of the text. For me, it is also hard to explain this magic numbers(100ms) from the API. I would ask in code review why not 99 :)
So I think it is better to give all options from framework and applications can write so-called static focus API easily with using these functions.
BTW, iOS safari was accepting programmatical focus only with user interaction(not tested with ios7 though). Are you sure you r not doing any interaction during this time.
Thanks for your feedback,
Cahit
from openui5.
Hi Cahit,
sorry for the delay, but i have been on holidays.
From a SOC point i can agree. But in a lot of UI5 apis like json model.load, etc., there are a lot of params (and event not all params for the underlying ajax call) that does not fullfill SOC! I liked the Sencha approach, that nearly all function accept a params list or an object as first param holding additional config options. Especially for model.load(oOptions) i would be able to passthorugh all ajax options and do not have to reimplement the whole function for some small changes.
But i will use my own prototyped focus method concerning delay, because i have a default delay which i can change centrally if an upcomming iOS release will no more fir 100mx. Maybe the UI5 implementation is a little bit more clever conercening rerendering and refocus handling.
Concerning iOS7, i just finshed our WM Tipp game
where you can check out the delayed focus keyboard handling. It will focus the email field on first loging and then store your email in localstorage. Next time the email will be set by former localstorage value and password will be focused.
The WM Tipp was the reason for my last 6 ticket where 3 of them has been luckily fixed:
There is a nice rumble animation on wrong login. i will write a blog post on my experiences concerning developing that tipp game device independantly.
Thanks for your comments.
Cheers Holger
from openui5.
Related Issues (20)
- Header of sap.f.DynamicPage with Icon Tab Bar as stickySubheaderProvider jumps when scrolling HOT 1
- Tracking prevention in Microsoft Edge blocks access to storage HOT 5
- Deprecated Coding in sap.ui.core.library.js HOT 1
- Input with sap.ui.model.type.Float type accepting all input type HOT 3
- Smart filter bar filter changes not taking effect immediately by clicking on Go button HOT 5
- Model event propagation does not work as expected HOT 6
- Planning Calendar onCellPress Issue HOT 2
- How to use for Smart Filter for customize views HOT 1
- AnalyticalTable mandatory filters HOT 1
- oFocusInfo lacks documentation HOT 2
- sap.m.ComboBox does not allow user to type in the whole word, instead it jumps to the second letter you typed HOT 1
- `status` parameter of `uploadComplete` event for `sap.ui.unified.FileUploader` should be of type `int` HOT 3
- `_enforceNoReturnValue.js` does not allow for async lifecycle hooks HOT 4
- sap.ui.layout.form.SimpleForm Aggregation Clone Issue HOT 1
- ui5 1.120.11 Unnecessary and unwanted scrollbar on sap.m.TabContainer HOT 4
- Custom Colors on CalendarAppointments are breaking the "selected" behaviour HOT 1
- sap.m.MessageBox: undeprecate usage of sap.ui.core.Control as vMessage HOT 3
- [ui5-input]: Clear icon is not getting focus from keyboard HOT 3
- Color Palette Popover and Color Picker not showing selected color in a user-friendly way HOT 3
- sap.ui.model.type.Currency shortRefNumber does not work with 1000 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openui5.