Skip to content

Navigation Menu

Sign in
Sign up

Focusing: focus/blur - #175

Open
msisaifu wants to merge 1 commit into
javascript-tutorial:master from
msisaifu:focus-blur
Open

Focusing: focus/blur #175
msisaifu wants to merge 1 commit into
javascript-tutorial:master from
msisaifu:focus-blur

Conversation

@msisaifu

@msisaifu msisaifu commented Apr 26, 2021

Copy link
Copy Markdown
Contributor

No description provided.

# ফোকাসিং: focus/blur

An element receives the focus when the user either clicks on it or uses the `key:Tab` key on the keyboard. There's also an `autofocus` HTML attribute that puts the focus onto an element by default when a page loads and other means of getting the focus.
কোন এলিমেন্টে ক্লিক বা কি বোর্ডের `key:Tab` প্রেসের মাধ্যমে নেভিগেশনের সময় ফোকাস ইভেন্ট সংগঠিত হয়। এছাড়াও HTML এ `autofocus` নামের একটি অ্যাট্রিবিউট আছে যা পেজ লোড হওয়ার সময় এলিমেন্টকে ফোকাস করে।

@jaamaalxyz jaamaalxyz Mar 11, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use সংঘটিত instead of সংগঠিত

কোন এলিমেন্টে ফোকাস বলতে বুঝায়: "এটির মধ্যে ডাটা যোগ করা সম্ভব", সুতরাং এর দ্বারা বোঝায় এলিমেন্টটিতে ডাটা নেয়ার জন্য প্রস্তুত।

The moment of losing the focus ("blur") can be even more important. That's when a user clicks somewhere else or presses `key:Tab` to go to the next form field, or there are other means as well.
যখন কোন এলিমেন্ট ফোকাস হারায় তখন তাকে বলে ("blur") এবং এটি সম্পর্কেও জেনে রাখা গুরুত্বপূর্ন। যখন ইউজার অন্য কোথাও ক্লিক করে অথবা `key:Tab` প্রেস করে তখন এটি সংগঠিত হয়।

@jaamaalxyz jaamaalxyz Mar 11, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use সংঘটিত instead of সংগঠিত

- The `blur` handler checks if the field has an email entered, and if not -- shows an error.
- The `focus` handler hides the error message (on `blur` it will be checked again):
- `blur` হ্যান্ডেলার চেক করবে ইনপুট কি ইমেইল? যদি না হয় তাহলে এরর দেখাবে।
- আবার অই ফিল্ডে ফোকাস হলে `focus` হ্যান্ডেলার এরর মেসেজ হাইড করবে (এবং যদি ফোকাস হারায় আবারো `blur` হ্যান্ডেলার কল হবে):

@jaamaalxyz jaamaalxyz Mar 11, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use ওই বা সেই instead of অই

*!*input.onfocus*/!* = function() {
if (this.classList.contains('invalid')) {
// remove the "error" indication, because the user wants to re-enter something
// "error" হাইড হবে, কেননা ইউজার কোন কিছু পুনরায় লিখতে চাচ্ছে

@jaamaalxyz jaamaalxyz Mar 11, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// "error" দেখাবে না, কেননা ইউজার কোন কিছু পুনরায় লিখতে চাচ্ছে


- An `alert` moves focus to itself, so it causes the focus loss at the element (`blur` event), and when the `alert` is dismissed, the focus comes back (`focus` event).
- If an element is removed from DOM, then it also causes the focus loss. If it is reinserted later, then the focus doesn't return.
- যখন `alert` কল হয় তখন ফোকাস অ্যালার্টে সংগঠিত হয়। সুতরাং তখন ঐ এলিমেন্টে (`blur` event) কল হয়, এবং আবার যখন `alert` ডিসমিস করা হয় তখন আবার ফোকাস ঐ এলিমেন্টে দেখায় এবং (`focus` ইভেন্ট সংগঠিত হয়)।

@jaamaalxyz jaamaalxyz Mar 11, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use সংঘটিত instead of সংগঠিত

@jaamaalxyz jaamaalxyz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revised the content and update the PR

Copy link
Copy Markdown

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

jaamaalxyz self-requested a review May 1, 2023 12:27

@jaamaalxyz jaamaalxyz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please resolved the requested changes

Copy link
Copy Markdown

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jaamaalxyz jaamaalxyz jaamaalxyz requested changes
+1 more reviewer
@yeasinjabed2 yeasinjabed2 yeasinjabed2 approved these changes
Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /